Re: AMQP client does not deque messages !!

2016-09-21 Thread Robbie Gemmell
You can see that the client granted 1 credit (presumably when you
called fetch) for the broker to send a message, then received a
message, granted another credit and accepted the first message, but
then didn't receive any more messages. Looks like
https://issues.apache.org/jira/browse/AMQ-6422.

On 21 September 2016 at 08:10, jporras  wrote:
> Hi , thanks for your answer. Find below log trace from the process ..
>
> Best regards, Javier
>
> javier@draco $ cat log.txt
> [0x7911e0]:  -> AMQP
> [0x7911e0]:  <- AMQP
> [0x7911e0]:0 -> @open(16)
> [container-id="62b1050c-8b62-412c-9c68-30574005db10", channel-max=32767,
> properties={:"qpid.client_process"=:"hello_world", :"qpid.client_pid"=2319,
> :"qpid.client_ppid"=1865}]
> [0x7911e0]:0 <- @open(16) [container-id="localhost",
> max-frame-size=4294967295, channel-max=32767, idle-time-out=15000,
> offered-capabilities=@PN_SYMBOL[:"ANONYMOUS-RELAY"],
> properties={:product="ActiveMQ", :"topic-prefix"="topic://",
> :"queue-prefix"="queue://", :version="5.14.0", :platform="Java/1.8.0_101"}]
> [0x7911e0]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
> outgoing-window=2147483647]
> [0x7911e0]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1,
> incoming-window=2147483647, outgoing-window=2147483647, handle-max=65535]
> [0x7911e0]:0 -> @attach(18)
> [name="REQ.SV1.TIMEOUT_1_f01b8af4-23b4-41e1-a999-23433b3464e6", handle=0,
> role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
> [address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0, dynamic=false],
> target=@target(41) [address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0,
> dynamic=false], initial-delivery-count=0]
> [0x7911e0]:0 <- @attach(18)
> [name="REQ.SV1.TIMEOUT_1_f01b8af4-23b4-41e1-a999-23433b3464e6", handle=0,
> role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
> [address="REQ.SV1.TIMEOUT_1"], target=@target(41)
> [address="REQ.SV1.TIMEOUT_1"], incomplete-unsettled=false,
> initial-delivery-count=0]
> [0x7911e0]:0 -> @attach(18)
> [name="REQ.SV1.TIMEOUT_1_92297aa4-3062-432a-9570-2bd51d1546f8", handle=1,
> role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
> [address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0, dynamic=false],
> target=@target(41) [address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0,
> dynamic=false], initial-delivery-count=0]
> [0x7911e0]:0 <- @attach(18)
> [name="REQ.SV1.TIMEOUT_1_92297aa4-3062-432a-9570-2bd51d1546f8", handle=1,
> role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
> [address="REQ.SV1.TIMEOUT_1"], target=@target(41)
> [address="REQ.SV1.TIMEOUT_1"]]
> [0x7911e0]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647,
> next-outgoing-id=1, outgoing-window=2147483647, handle=1, delivery-count=0,
> link-credit=1000]
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=0,
> delivery-tag=b"\x00\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=1,
> delivery-tag=b"\x01\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=2,
> delivery-tag=b"\x02\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=3,
> delivery-tag=b"\x03\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=4,
> delivery-tag=b"\x04\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=5,
> delivery-tag=b"\x05\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=6,
> delivery-tag=b"\x06\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=7,
> delivery-tag=b"\x07\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=8,
> delivery-tag=b"\x08\x00\x00\x00", message-format=0, settled=false,
> more=false] (32)
> "\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
> [0x7911e0]:0 -> @flow(19) [next-incoming-id=1, incoming-window=2147483647,
> next-outgoing-id=9, outgoing-window=2147483647, handle=0, delivery-count=0,
> link-credit=1, drain=false]
> [0x7911e0]:0 

Cannot start ActiveMQ network broker

2016-09-21 Thread TC
Hi, 

After creating the network of brokers, i.e. about 4 of them on the same
laptop. 
I can start them without any problem. 

Not sure what I have changed in between - not it doesnt start. 

Here is error exception - any guides on how to troubleshoot more


Loading message broker from: xbean:activemq.xml
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
java.io
.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError:
org/s
pringframework/beans/BeansException
java.lang.RuntimeException: Failed to execute start task. Reason:
java.io.IOExce
ption: Could not load xbean factory:java.lang.NoClassDefFoundError:
org/springfr
amework/beans/BeansException
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:91)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:150)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.io.IOException: Could not load xbean
factory:java.lang.NoClassDe
fFoundError: org/springframework/beans/BeansException
at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:27)
at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:43)
at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:70)
at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:87)
... 10 more
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/BeansExcept
ion
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create
(FactoryFinder.java:61)
at
org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java
:146)
at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:41)
... 13 more
Caused by: java.lang.ClassNotFoundException:
org.springframework.beans.BeansExce
ption
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 20 more
ERROR: java.io.IOException: Could not load xbean
factory:java.lang.NoClassDefFou
ndError: org/springframework/beans/BeansException
java.io.IOException: Could not load xbean
factory:java.lang.NoClassDefFoundError
: org/springframework/beans/BeansException
at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:27)
at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:43)
at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:70)
at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:87)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:150)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/BeansExcept
ion
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at

Re: KAHADB clean up old log files

2016-09-21 Thread Tim Bain
The most likely place for you to have old messages laying around is in the
DLQ.  The next most likely place is on a topic for an offline (and never
coming back) durable subscriber.

Tim

On Sep 20, 2016 2:02 PM, "Christopher Shannon" <
christopher.l.shan...@gmail.com> wrote:

Do you have old messages laying around?  KahaDB can't clean up old journal
files if there are messages scattered throughout the logs.  Even a single
unacked message means that a journal file (and the future files) can't be
cleaned up. This situation tends to happen either when there are old
messages not being acked quick enough or there are different destinations
with different speeds.  Ie if one queue has a very slow message rate and
another queue has a high message rate.

Assuming there isn't some sort of bug with the GC process then one way to
help lower the usage would be to split up destinations into different
stores using multiKahaDB.  Take a look at Gary's blog post on this:
http://blog.garytully.com/2011/11/activemq-multiple-kahadb-instances.html


On Tue, Sep 20, 2016 at 1:04 PM, Hill, Steve  wrote:

> Hi fellow ActiveMQ users!
>
> I have searched all over the internet and can not find a solution to a
> problem we are experiencing where old log files are not removed from
> KAHADB.  Needless to say we uncovered this problem when we exceeded the
> size of our persistent store in production :-)
>
> We are using client side acknowledgement for all reads from the Queue and
> have restarted all clients and also ActiveMQ numerous times, yet the
> messages do not get removed.  We are also using the network connector to
> move messages to the queue that has an active consumer.  We were using
> 5.13.0 but moved to 5.14.0 on the hope it might address this problem.
>
> Follows are some more detailed messages; does anyone have an idea how we
> can resolve this problem?
>
> KAHADB logging is enabled and we see the following messages in the log
> file.
>
>
>  2016-09-20 08:59:10,207 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1278 as contained ack(s) refer to
> referenced file: [1278, 1277]
>
>  2016-09-20 08:59:10,207 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1279 as contained ack(s) refer to
> referenced file: [674]
>
>  2016-09-20 08:59:10,208 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1280 as contained ack(s) refer to
> referenced file: [691]
>
>  2016-09-20 08:59:10,208 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1281 as contained ack(s) refer to
> referenced file: [699]
>
>  2016-09-20 08:59:10,209 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1282 as contained ack(s) refer to
> referenced file: [699]
>
>  2016-09-20 08:59:10,210 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1283 as contained ack(s) refer to
> referenced file: [705]
>
>  2016-09-20 08:59:10,210 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1284 as contained ack(s) refer to
> referenced file: [711]
>
>  2016-09-20 08:59:10,211 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1288 as contained ack(s) refer to
> referenced file: [674]
>
>  2016-09-20 08:59:10,211 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1289 as contained ack(s) refer to
> referenced file: [790]
>
>  2016-09-20 08:59:10,212 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1290 as contained ack(s) refer to
> referenced file: [1290, 1278]
>
>  2016-09-20 08:59:10,213 [eckpoint Worker] TRACE MessageDatabase
>   - not removing data file: 1291 as contained ack(s) refer to
> referenced file: [790]
>
> The files at this point are months old.
>
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 14 21:23 db-674.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 16 01:57 db-691.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 17 02:10 db-699.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 18 03:55 db-705.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 19 01:32 db-711.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 25 15:15 db-790.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 26 10:32 db-858.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 27 00:19 db-865.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 27 03:03 db-866.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 28 01:45 db-877.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 29 01:18 db-888.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 30 02:10 db-899.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Jul 31 01:11 db-904.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Aug  1 00:19 db-909.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Aug  1 04:42 db-910.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Aug  2 01:07 db-918.log
>
> -rw-r--r--. 1 activemq activemq 33554432 Aug  3 01:38 db-930.log
>
> 

Re: two possible issues when integrating with spring-jms

2016-09-21 Thread Tim Bain
For your first question, if that happens, you'll get an overflow
exception.  Of course, Long.MAX_VALUE is 9223372036854775807, so you're
worrying about a non-issue.

For your second question, can you please clarify exactly what you're
asking?  Also, depending on what the question is, you may have better luck
asking it of the Spring developers, since the method you referenced is
their code and not ours.

On Sep 21, 2016 7:36 AM, "ted_dong" <492399...@qq.com> wrote:

> First Question:
> Method JmsInvokerClientInterceptor.doExecuteRequest(Session, Queue,
> Message)
> is trying to create a TemporaryQueue then delete it. However, for each
> TemporaryQueue, connection will use LongSequenceGenerator to generate a
> incrementing queue name, what if sequence id grow bigger than
> Long.MAX_VALUE.
>
> Second Question:
> Again, for doExecuteRequest, if two thread is calling this method. For
> instance, thread A send a request to queue Q first, thread B send to queue
> Q
> later, but response for request B arrives first and response A later. Then
> thread A takes response of thread B.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/two-possible-issues-when-integrating-with-
> spring-jms-tp4716687.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Can you please share Apache.NMS.AMQP.dll?

2016-09-21 Thread Kumar
I am not having knowledge on c plus program

if anyone having Apache.NMS.AMQP.dll 32bit Windows, Can you please share the
binary files with its dependency binary files.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Can-you-please-share-Apache-NMS-AMQP-dll-tp4716686.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: JMS exception during the Failover

2016-09-21 Thread Tim Bain
The catch block in your consumer looks very suspicious, since it starts
additional consumers without closing the previous ones.  Would you please
comment out the line that's there, and also add a line to log the exception
you're catching?

Tim

On Sep 20, 2016 11:16 AM, "akhil"  wrote:

> Hi Tim ,
>
> I have tried with the graceful shutdown by not using kill any more but
> still
> it's on the same way of dealing the consumer thread block.
>
> you can find the new switch log here :
> https://gist.github.com/areddy7021/e0e3a6c89fc974ce3031e326c060acca
>
> I have switched like this way ..started with Broker A as master and B as
> slave ..-- > everything is fine
>
> Broker A service down and Broker B as new master -- > Producer is fine and
> Consumer started throwing exception and still consumed even after the
> switch
> since some buffered messages in prefetch buffer and after that inactivity
> monitor started throwing up and connection state in in blocked state in
> jconsole.
>
> Broker B service down and Broker A as new master ---> Producer no issues as
> usual. Consumer started showing some log in attempt to connect to new
> master
> but its not done with the inactivity log. The above gist log is for this
> scenario.
>
> Thanks,
> Akhil.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/JMS-exception-during-the-Failover-tp4716047p4716660.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Cannot start ActiveMQ network broker

2016-09-21 Thread Geoffrey Mina
Looks like maybe the core spring jar is no longer in your class path.


On Sep 21, 2016, at 7:36 AM, TC 
> wrote:

Hi,

After creating the network of brokers, i.e. about 4 of them on the same
laptop.
I can start them without any problem.

Not sure what I have changed in between - not it doesnt start.

Here is error exception - any guides on how to troubleshoot more


Loading message broker from: xbean:activemq.xml
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
java.io
.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError:
org/s
pringframework/beans/BeansException
java.lang.RuntimeException: Failed to execute start task. Reason:
java.io.IOExce
ption: Could not load xbean factory:java.lang.NoClassDefFoundError:
org/springfr
amework/beans/BeansException
   at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:91)
   at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
   at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:150)
   at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
   at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
   at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.io.IOException: Could not load xbean
factory:java.lang.NoClassDe
fFoundError: org/springframework/beans/BeansException
   at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:27)
   at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:43)
   at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:70)
   at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
   at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:87)
   ... 10 more
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/BeansExcept
ion
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
   at java.lang.Class.getConstructor0(Unknown Source)
   at java.lang.Class.newInstance(Unknown Source)
   at
org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create
(FactoryFinder.java:61)
   at
org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java
:146)
   at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:41)
   ... 13 more
Caused by: java.lang.ClassNotFoundException:
org.springframework.beans.BeansExce
ption
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 20 more
ERROR: java.io.IOException: Could not load xbean
factory:java.lang.NoClassDefFou
ndError: org/springframework/beans/BeansException
java.io.IOException: Could not load xbean
factory:java.lang.NoClassDefFoundError
: org/springframework/beans/BeansException
   at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:27)
   at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:43)
   at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:70)
   at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
   at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:87)
   at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
   at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:150)
   at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
   at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:104)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
   at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/BeansExcept
ion
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)

Re: two possible issues when integrating with spring-jms

2016-09-21 Thread Christopher Shannon
To answer your first question, growing larger than Long.MAX_VALUE is
practically impossible. The value is 9,223,372,036,854,775,807.  Even if
you were to create 1 temporary queue every millisecond it would take over
292 million years to reach Long.MAX_VALUE

For your second question, there is no issue because each request would have
its own unique temporary queue for a response so they don't interfere.
When you use a temporary queue the message contains name of the unique
reply to destination.  So when you send a message to queue Q and it is
processed, the receive of the message can check to the JMSReplyTo property
to know where to send the response to.  This means that the order it is
processed doesn't really matter and shouldn't interfere.

On Wed, Sep 21, 2016 at 8:07 AM, ted_dong <492399...@qq.com> wrote:

> First Question:
> Method JmsInvokerClientInterceptor.doExecuteRequest(Session, Queue,
> Message)
> is trying to create a TemporaryQueue then delete it. However, for each
> TemporaryQueue, connection will use LongSequenceGenerator to generate a
> incrementing queue name, what if sequence id grow bigger than
> Long.MAX_VALUE.
>
> Second Question:
> Again, for doExecuteRequest, if two thread is calling this method. For
> instance, thread A send a request to queue Q first, thread B send to queue
> Q
> later, but response for request B arrives first and response A later. Then
> thread A takes response of thread B.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/two-possible-issues-when-integrating-with-
> spring-jms-tp4716687.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: JMS exception during the Failover

2016-09-21 Thread akhil
Hi Tim , 

I am sorry that one was the outdated consumer , I have changed it long time
back and forgot to update the gist. Yes i have tried yourway but the same
result.

Thanks,
Akhil.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/JMS-exception-during-the-Failover-tp4716047p4716706.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ Shared File System Master Slave with Elastic File System

2016-09-21 Thread khokhani
Thanks Tim!  Thanks Justin! for insight on this topic.

I have setup Amazon EFS as LevelDB persistence store and MySql based locker.
All functional and failover testing are positive and message are available
and delivered without any failure or loss while switching from master to
slave as well as restarting all brokers.

Is there any other danger using EFS with RDBMS based locker?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Shared-File-System-Master-Slave-with-Elastic-File-System-tp4715818p4716712.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


two possible issues when integrating with spring-jms

2016-09-21 Thread ted_dong
First Question:
Method JmsInvokerClientInterceptor.doExecuteRequest(Session, Queue, Message)
is trying to create a TemporaryQueue then delete it. However, for each
TemporaryQueue, connection will use LongSequenceGenerator to generate a
incrementing queue name, what if sequence id grow bigger than
Long.MAX_VALUE.

Second Question:
Again, for doExecuteRequest, if two thread is calling this method. For
instance, thread A send a request to queue Q first, thread B send to queue Q
later, but response for request B arrives first and response A later. Then
thread A takes response of thread B.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/two-possible-issues-when-integrating-with-spring-jms-tp4716687.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Cannot start ActiveMQ network broker

2016-09-21 Thread Matt Pavlovich

You are probably missing the spring and/or xbean-spring dependency


On 9/21/16 1:15 AM, TC wrote:

Hi,

After creating the network of brokers, i.e. about 4 of them on the same
laptop.
I can start them without any problem.

Not sure what I have changed in between - not it doesnt start.

Here is error exception - any guides on how to troubleshoot more


Loading message broker from: xbean:activemq.xml
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
java.io
.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError:
org/s
pringframework/beans/BeansException
java.lang.RuntimeException: Failed to execute start task. Reason:
java.io.IOExce
ption: Could not load xbean factory:java.lang.NoClassDefFoundError:
org/springfr
amework/beans/BeansException
 at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:91)
 at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
 at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:150)
 at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
 at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:104)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
 at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.io.IOException: Could not load xbean
factory:java.lang.NoClassDe
fFoundError: org/springframework/beans/BeansException
 at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:27)
 at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:43)
 at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:70)
 at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
 at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:87)
 ... 10 more
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/BeansExcept
ion
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
 at java.lang.Class.getConstructor0(Unknown Source)
 at java.lang.Class.newInstance(Unknown Source)
 at
org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create
(FactoryFinder.java:61)
 at
org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java
:146)
 at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:41)
 ... 13 more
Caused by: java.lang.ClassNotFoundException:
org.springframework.beans.BeansExce
ption
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 ... 20 more
ERROR: java.io.IOException: Could not load xbean
factory:java.lang.NoClassDefFou
ndError: org/springframework/beans/BeansException
java.io.IOException: Could not load xbean
factory:java.lang.NoClassDefFoundError
: org/springframework/beans/BeansException
 at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:27)
 at
org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(B
rokerFactory.java:43)
 at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:70)
 at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
 at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:87)
 at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
 at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:150)
 at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
 at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:104)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
 at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/BeansExcept
ion
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Unknown 

Backup option not working in CMS

2016-09-21 Thread michele.bozzaotre
Hi all,
In my domain there is a cluster of 2 brokers and several CMS clients. The
failover protocol works very well when i switch off ActiveMQ on one of the
brokers, but not *when I unplug the network cable* from the server. In this
case, it takes about 10 seconds to switch to the other node, whereas I need
the client switches in 1-2 seconds. I have also configured the inactivity
monitor set to 1 second, but the 10 seconds delay in the switching persists.
Now this is my uri:

failover://(tcp://BROKER1:61616,tcp://BROKER2:61616)?randomize=false""=1000=1000

After several tests, I believe to have understood the reason the delay in
the switching on the other server. Once the cable is disconnected, the
inactivity monitor detects the disconnection after 1 second and the client
tries to close the socket; however the server can't answer and the socket
remains in *FIN_WAIT_1* status for about ten seconds. After the socket is
finally closed and the client switches to the other broker.

Based on my tests, no one of the available options of the CMS library can
force the client to close immediately the socket. The only option useful
seems to be *backup=true*, which requires the client to establish a
connection for each broker of the cluster. Adding this option, the
connection is successful and I can see both sockets established; the first
one is used for exchanging the messages, while the other one only for
keepAliveInfo messages as required by the inactivity monitor. When I unplug
the cable from the first broker, the client looses forever the connection
for the most part of the times. When rarely it works, the switching is very
fast as I want. Therefore I'm confident this is the right option for my
needs, but it seems affected by a bug.

Have you ever experienced the *backup=true* option for failover transport?
Any issue reported about this option?

Thank you in advance for your help.




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Backup-option-not-working-in-CMS-tp4716711.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ Shared File System Master Slave with Elastic File System

2016-09-21 Thread Tim Bain
I hadn't heard of anyone using EFS before you asked about it.  That's not
to say that no one has, just that I've got less idea than you do about what
if any pitfalls you might find along the way.

On Sep 21, 2016 10:33 AM, "khokhani"  wrote:

> Thanks Tim!  Thanks Justin! for insight on this topic.
>
> I have setup Amazon EFS as LevelDB persistence store and MySql based
> locker.
> All functional and failover testing are positive and message are available
> and delivered without any failure or loss while switching from master to
> slave as well as restarting all brokers.
>
> Is there any other danger using EFS with RDBMS based locker?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Active-MQ-Shared-File-System-Master-Slave-with-
> Elastic-File-System-tp4715818p4716712.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Iterate over non-persistent activemq expired messages in ActiveMQ.Advisory.Expired.Queue

2016-09-21 Thread chetansistla
Hi,

Iam building an application on activemq where iam sending a message from
producer where my delivery mode is NON_PERSISTENT (*iam not dealing with
PERSISTENT delivery mode and i know it will be stored in DLQ-which is not my
design*)and have set a time to live for the message using
producer.setTimeToLive(2000).As the functionality says the message will
expire in 2 seconds.

I see that the expired messages are enqueued in the
*ActiveMQ.Advisory.Expired.Queue* in the topic section of activeMQ admin
console i.e. *http://localhost:8161/admin/topics.jsp.
*
My question is how do i *iterate* over the *ActiveMQ.Advisory.Expired.Queue*
so that i can access the *MessageID* of the expired message.Any code example
would be great.




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Iterate-over-non-persistent-activemq-expired-messages-in-ActiveMQ-Advisory-Expired-Queue-tp4716777.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: AMQP client does not deque messages !!

2016-09-21 Thread jporras
Hi , thanks for your answer. Find below log trace from the process .. 

Best regards, Javier 

javier@draco $ cat log.txt
[0x7911e0]:  -> AMQP
[0x7911e0]:  <- AMQP
[0x7911e0]:0 -> @open(16)
[container-id="62b1050c-8b62-412c-9c68-30574005db10", channel-max=32767,
properties={:"qpid.client_process"=:"hello_world", :"qpid.client_pid"=2319,
:"qpid.client_ppid"=1865}]
[0x7911e0]:0 <- @open(16) [container-id="localhost",
max-frame-size=4294967295, channel-max=32767, idle-time-out=15000,
offered-capabilities=@PN_SYMBOL[:"ANONYMOUS-RELAY"],
properties={:product="ActiveMQ", :"topic-prefix"="topic://",
:"queue-prefix"="queue://", :version="5.14.0", :platform="Java/1.8.0_101"}]
[0x7911e0]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=2147483647]
[0x7911e0]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1,
incoming-window=2147483647, outgoing-window=2147483647, handle-max=65535]
[0x7911e0]:0 -> @attach(18)
[name="REQ.SV1.TIMEOUT_1_f01b8af4-23b4-41e1-a999-23433b3464e6", handle=0,
role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0, dynamic=false],
target=@target(41) [address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0,
dynamic=false], initial-delivery-count=0]
[0x7911e0]:0 <- @attach(18)
[name="REQ.SV1.TIMEOUT_1_f01b8af4-23b4-41e1-a999-23433b3464e6", handle=0,
role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="REQ.SV1.TIMEOUT_1"], target=@target(41)
[address="REQ.SV1.TIMEOUT_1"], incomplete-unsettled=false,
initial-delivery-count=0]
[0x7911e0]:0 -> @attach(18)
[name="REQ.SV1.TIMEOUT_1_92297aa4-3062-432a-9570-2bd51d1546f8", handle=1,
role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0, dynamic=false],
target=@target(41) [address="REQ.SV1.TIMEOUT_1", durable=0, timeout=0,
dynamic=false], initial-delivery-count=0]
[0x7911e0]:0 <- @attach(18)
[name="REQ.SV1.TIMEOUT_1_92297aa4-3062-432a-9570-2bd51d1546f8", handle=1,
role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="REQ.SV1.TIMEOUT_1"], target=@target(41)
[address="REQ.SV1.TIMEOUT_1"]]
[0x7911e0]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647,
next-outgoing-id=1, outgoing-window=2147483647, handle=1, delivery-count=0,
link-credit=1000]
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=0,
delivery-tag=b"\x00\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=1,
delivery-tag=b"\x01\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=2,
delivery-tag=b"\x02\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=3,
delivery-tag=b"\x03\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=4,
delivery-tag=b"\x04\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=5,
delivery-tag=b"\x05\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=6,
delivery-tag=b"\x06\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=7,
delivery-tag=b"\x07\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=8,
delivery-tag=b"\x08\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 -> @flow(19) [next-incoming-id=1, incoming-window=2147483647,
next-outgoing-id=9, outgoing-window=2147483647, handle=0, delivery-count=0,
link-credit=1, drain=false]
[0x7911e0]:0 -> @transfer(20) [handle=1, delivery-id=9,
delivery-tag=b"\x09\x00\x00\x00", message-format=0, settled=false,
more=false] (32)
"\x00Sp\xc0\x04\x02BP\x00\x00St\xc1\x01\x00\x00Sw\xa1\x0cHello world!"
[0x7911e0]:0 <- @disposition(21) [role=true, first=0, last=0, settled=true,
state=@accepted(36) []]
[0x7911e0]:0 <- @disposition(21) [role=true, first=1, last=1, settled=true,
state=@accepted(36) []]
[0x7911e0]:0 <- @disposition(21) [role=true, first=2, last=2, settled=true,
state=@accepted(36) []]
[0x7911e0]:0 <- @disposition(21)