From usersjbarnett@example.com Fri May 01 05:01:17 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 58256 invoked from network); 1 May 2009 05:01:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 05:01:17 -0000 Received: (qmail 79023 invoked by uid 500); 1 May 2009 05:01:16 -0000 Delivered-To: jbarnett@example.com Received: (qmail 78979 invoked by uid 500); 1 May 2009 05:01:16 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 78969 invoked by uid 99); 1 May 2009 05:01:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 05:01:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 05:01:06 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1Lzkrd-0002VK-JI for jbarnett@example.com; Thu, 30 Apr 2009 22:00:45 -0700 Message-ID: <jbarnett@example.com> Date: Thu, 30 Apr 2009 22:00:45 -0700 (PDT) From: "bo.xie" <jbarnett@example.com> To: jbarnett@example.com Subject: http connection got "Could not post command" error MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am new to activeMQ. I used 5.1.0 on linux to try out http connection using the producer sample code. I added the following to the activemq.xml, the broker startup fine. <transportConnector name="http" uri="http://localhost:61522"/> When I tried to connect to the broker using "http://localhost:61522" from client program. Got the following error. Any idea what I may have done wrong? The client in test is on the same machine as the broker. Thanks for the help. -Bo javax.jms.JMSException: Could not post command: ConnectionInfo {commandId = 1, responseRequired = true, connectionId = ID:boxie-lnx-57587-1241151559354-0:0, clientId = ID:boxie-lnx-57587-1241151559354-2:0, userName = null, password = null, brokerPath = null, brokerMasterConnector = false, manageable = true, clientMaster = true} due to: java.io.IOException: Failed to post command: ConnectionInfo {commandId = 1, responseRequired = true, connectionId = ID:boxie-lnx-57587-1241151559354-0:0, clientId = ID:boxie-lnx-57587-1241151559354-2:0, userName = null, password = null, brokerPath = null, brokerMasterConnector = false, manageable = true, clientMaster = true} as response was: 500 [java] javax.jms.JMSException: Could not post command: ConnectionInfo {commandId = 1, responseRequired = true, connectionId = ID:boxie-lnx-57587-1241151559354-0:0, clientId = ID:boxie-lnx-57587-1241151559354-2:0, userName = null, password = null, brokerPath = null, brokerMasterConnector = false, manageable = true, clientMaster = true} due to: java.io.IOException: Failed to post command: ConnectionInfo {commandId = 1, responseRequired = true, connectionId = ID:boxie-lnx-57587-1241151559354-0:0, clientId = ID:boxie-lnx-57587-1241151559354-2:0, userName = null, password = null, brokerPath = null, brokerMasterConnector = false, manageable = true, clientMaster = true} as response was: 500 [java] at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62) [java] at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1206) [java] at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1289) [java] at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:456) [java] at ProducerTool.run(Unknown Source) [java] at ProducerTool.main(Unknown Source) [java] Caused by: java.io.IOException: Could not post command: ConnectionInfo {commandId = 1, responseRequired = true, connectionId = ID:boxie-lnx-57587-1241151559354-0:0, clientId = ID:boxie-lnx-57587-1241151559354-2:0, userName = null, password = null, brokerPath = null, brokerMasterConnector = false, manageable = true, clientMaster = true} due to: java.io.IOException: Failed to post command: ConnectionInfo {commandId = 1, responseRequired = true, connectionId = ID:boxie-lnx-57587-1241151559354-0:0, clientId = ID:boxie-lnx-57587-1241151559354-2:0, userName = null, password = null, brokerPath = null, brokerMasterConnector = false, manageable = true, clientMaster = true} as response was: 500 [java] at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33) [java] at org.apache.activemq.transport.http.HttpClientTransport.oneway(HttpClientTransport.java:89) [java] at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40) [java] at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:74) [java] at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:79) [java] at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1195) -- View this message in context: http://www.nabble.com/http-connection-got-%22Could-not-post-command%22-error-tp23328499p23328499.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Fri May 01 06:05:37 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 84264 invoked from network); 1 May 2009 06:05:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 06:05:37 -0000 Received: (qmail 98628 invoked by uid 500); 1 May 2009 06:05:36 -0000 Delivered-To: jbarnett@example.com Received: (qmail 98561 invoked by uid 500); 1 May 2009 06:05:36 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 98550 invoked by uid 99); 1 May 2009 06:05:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 06:05:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 06:05:28 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1Lzlrv-0004ou-5s for jbarnett@example.com; Thu, 30 Apr 2009 23:05:07 -0700 Message-ID: <jbarnett@example.com> Date: Thu, 30 Apr 2009 23:05:07 -0700 (PDT) From: activezl <jbarnett@example.com> To: jbarnett@example.com Subject: questions regarding the keep alive mechanism MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hello all, I am trying to understand how the keep alive is implemented in two versions of ActiveMQ (4.1.1 and 5.2.0). 1) Is it the case (in version 4.1.0) that both the client and the broker are sending the KeepAliveInfo command or this is only sent by the client? In version 4.1.0: is it true that the broker does not acknowledge the keep alive sent by clients? 2) Is it true that the exact same code (the InactivityMonitor class) is running on both the server and the client (question valid for both versions)? 3) Was the way that the keep alive is implemented changed between version 4.1.0 and version 5.2.0 (in terms of this biderectional pinging)? Thanks. -- View this message in context: http://www.nabble.com/questions-regarding-the-keep-alive-mechanism-tp23328819p23328819.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Fri May 01 12:40:20 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 18667 invoked from network); 1 May 2009 12:40:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 12:40:20 -0000 Received: (qmail 74032 invoked by uid 500); 1 May 2009 12:40:19 -0000 Delivered-To: jbarnett@example.com Received: (qmail 73972 invoked by uid 500); 1 May 2009 12:40:19 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 73962 invoked by uid 99); 1 May 2009 12:40:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 12:40:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO h57067.serverkompetenz.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 12:40:10 +0000 Received: from h57067.serverkompetenz.net (unknown [83.161.120.155]) by h57067.serverkompetenz.net (Postfix) with ESMTP id 342B780050 for <jbarnett@example.com>; Fri, 1 May 2009 12:39:47 +0000 (UTC) Received: from [83.161.120.155] (unknown [83.161.120.155]) by h57067.serverkompetenz.net (Postfix) with ESMTP for <jbarnett@example.com>; Fri, 1 May 2009 12:39:47 +0000 (UTC) Message-Id: <jbarnett@example.com> From: Andreas Gies <jbarnett@example.com> To: jbarnett@example.com In-Reply-To: <jbarnett@example.com> Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Please help:Again about ActiveMQ intigration with Websphere 6.1 Date: Fri, 1 May 2009 14:39:46 +0200 References: <jbarnett@example.com> <jbarnett@example.com> <jbarnett@example.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org Hi there, sorry to say, but the IBM guy is kind of wrong. You can bind AMQ =20 administered objects in any JNDI store. This having said, the ActiveMQ JNDI implementation =20= takes the information from a file called jndi.properties on the classpath. You cannot =20 programmatically bind objects into the AMQ JNDI implementation. Find more infos here: http://activemq.apache.org/jndi-support.html This having said, I am convinced that AMQ can meet your messaging =20 needs; but at the end of the day you have to choose yourself. Best regards Andreas On Apr 30, 2009, at 10:11 PM, Websphere and ActiveMQ wrote: > > Hi Andreas, > > I have created some queues on ActiveMQ and tested them using pure Java > Client, they worked well.here I use JNDI.properties file. > > But as IBMer said, I have to create JNDI name space in ActiveMQ end, =20= > or > create JMS Administered Objects, I remembered I need to create it =20 > when I > used MQ before. > > So do you know how to create JMS Administered Objects(JNDI name =20 > space) in > ActiveMQ end?? > > Now I'm choosing a suitable MQ to replace IBM=E3=80=80=EF=BC=AD=EF=BC=B1= =EF=BC=8C=E3=80=80=EF=BD=89=EF=BD=86=E3=80=80=20 > =EF=BC=A1=EF=BD=83=EF=BD=94=EF=BD=89=EF=BD=96=EF=BD=85=EF=BC=AD=EF=BC=B1= =E3=80=80=EF=BD=84=EF=BD=8F=EF=BD=85=EF=BD=93=EF=BD=8E=E2=80=98=EF=BD=94=E3= =80=80=EF=BD=97=EF=BD=8F=EF=BD=92=EF=BD=8B=EF=BC=8C > =EF=BD=97=EF=BD=88=EF=BD=89=EF=BD=83=EF=BD=88=E3=80=80=EF=BD=8F=EF=BD=8E= =EF=BD=85=E3=80=80=EF=BD=89=EF=BD=93=E3=80=80=EF=BD=82=EF=BD=85=EF=BD=94=EF= =BD=94=EF=BD=85=EF=BD=92=EF=BC=88=EF=BD=83=EF=BD=88=EF=BD=81=20 > =EF=BD=8E=EF=BD=87=EF=BD=85=E3=80=80=EF=BD=8C=EF=BD=85=EF=BD=93=EF=BD=93= =E3=80=80=EF=BD=83=EF=BD=8F=EF=BD=84=EF=BD=85=E3=80=80=EF=BD=85=EF=BD=98=EF= =BD=89=EF=BD=93=EF=BD=94=EF=BD=89=EF=BD=8E=EF=BD=87=E3=80=80=20 > =EF=BD=89=EF=BD=8E=E3=80=80=EF=BD=8F=EF=BD=95=EF=BD=92=E3=80=80=EF=BD=93= =EF=BD=99=EF=BD=93=EF=BD=94=EF=BD=85=EF=BD=8D=EF=BC=89=EF=BC=8C=E3=80=80=EF= =BC=AA=EF=BC=A2=EF=BD=8F=EF=BD=93=EF=BD=93=E3=80=80=EF=BC=AD=20 > =EF=BD=85=EF=BD=93=EF=BD=93=EF=BD=81=EF=BD=87=EF=BD=85 > =EF=BD=8F=EF=BD=92=E3=80=80=EF=BC=AF=EF=BD=90=EF=BD=85=EF=BD=8E=E3=80=80= =EF=BC=AD=EF=BD=85=EF=BD=93=EF=BD=93=EF=BD=81=EF=BD=87=EF=BD=85=E3=80=80=EF= =BC=B1=EF=BD=95=EF=BD=85=EF=BD=95=EF=BD=85=EF=BC=88=EF=BC=B3=20 > =EF=BD=95=EF=BD=8E=EF=BC=89=EF=BC=8E > > Thanks. > > Derrick > > > Andreas Gies wrote: >> >> Hi there, >> >> it seems, that your Queue cannot be located in the JNDI store. On the >> first >> glance I find it unusual that in an AppServer context you are using =20= >> the >> ActiveMQ JNDI store. >> >> However, when you are using that, you must be sure, that the >> jndi.properties >> file where you have defined your JMS administered objects can be =20 >> found >> on >> the classpath. >> >> This having said, I would find it more natural to use the JNDI store >> that comes >> with the app server. I don't know WebSphere from the top of my head, >> but that >> should be easy to find in the docs. You can either use a management =20= >> GUI >> to define those objects or use a small program, that creates the >> ActiveMQ objects >> on the fly and stores them in WebSphere JNDI. >> >> Hope that helps >> Andreas >> >> On Apr 27, 2009, at 10:09 PM, Websphere and ActiveMQ wrote: >> >>> >>> I have already configurated ActiveMQ in Websphere 6.1 as someone >>> described >>> here, but when I re-started websphere, the following error is >>> appeared: >>> ####### error ########## >>> Content: JndiLookupInfo: jndiName=3D"MyReceiveQueue"; >>> providerURL=3D"tcp://localhost:61616"; >>> initialContextFactory >>> =3D"org.apache.activemq.jndi.ActiveMQInitialContextFactory" >>> Address Type: IndirectJndiLookupAdditionalProperties >>> AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 >>> 74 69 6c >>> 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a ... >>> >>> Exception data follows: >>> javax.naming.NameNotFoundException: MyReceiveQueue >>> at >>> org=20 >>> .apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java: >>> 225) >>> at javax.naming.InitialContext.lookup(InitialContext.java:363) >>> at >>> com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory >>> $1.run(IndirectJndiLookupObjectFactory.java:375) >>> at >>> com >>> .ibm >>> .ws >>> .security.util.AccessController.doPrivileged(AccessController.java: >>> 118) >>> at >>> com >>> .ibm >>> .ws >>> .naming >>> .util >>> .IndirectJndiLookupObjectFactory >>> .getObjectInstanceExt(IndirectJndiLookupObjectFactory.java:221) >>> at >>> com >>> .ibm >>> .ws >>> .naming >>> .util.Helpers.processSerializedObjectForLookupExt(Helpers.java:893) >>> at >>> com >>> .ibm >>> .ws >>> .naming.util.Helpers.processSerializedObjectForLookup(Helpers.java: >>> 705) >>> at >>> com >>> .ibm >>> .ws >>> .naming >>> .jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:=20 >>> 2093) >>> at >>> com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java: >>> 1947) >>> at >>> com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java: >>> 1862) >>> at >>> com=20 >>> .ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java: >>> 1552) >>> at >>> com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java: >>> 1354) >>> at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172) >>> at javax.naming.InitialContext.lookup(InitialContext.java:363) >>> at >>> com >>> .ibm >>> .ejs >>> .jms.listener.MDBListenerImpl.createResources(MDBListenerImpl.java: >>> 235) >>> at >>> com >>> .ibm >>> .ejs=20 >>> .jms.listener.MDBListenerImpl.internalStart(MDBListenerImpl.java: >>> 727) >>> at >>> com >>> .ibm.ejs.jms.listener.MDBListenerImpl.restart(MDBListenerImpl.java: >>> 700) >>> at >>> com.ibm.ejs.jms.listener.MDBListenerImpl.alarm(MDBListenerImpl.java: >>> 1035) >>> at com.ibm.ejs.util.am._Alarm.run(_Alarm.java:90) >>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) >>> ############################### >>> Could anyone tell me what's the error, do I need to do some extra >>> work on >>> ActiveMQ end or Websphere End. >>> Thanks. >>> >>> --=20 >>> View this message in context: >>> = http://www.nabble.com/Please-help%3AAgain-about-ActiveMQ-intigration-with-= Websphere-6.1-tp23263958p23263958.html >>> Sent from the ActiveMQ - User mailing list jbarnett@example.com. >>> >> >> >> > > --=20 > View this message in context: = http://www.nabble.com/Please-help%3AAgain-about-ActiveMQ-intigration-with-= Websphere-6.1-tp23263958p23322601.html > Sent from the ActiveMQ - User mailing list jbarnett@example.com. > From usersjbarnett@example.com Fri May 01 12:49:10 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 21497 invoked from network); 1 May 2009 12:49:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 12:49:09 -0000 Received: (qmail 80705 invoked by uid 500); 1 May 2009 12:49:09 -0000 Delivered-To: jbarnett@example.com Received: (qmail 80637 invoked by uid 500); 1 May 2009 12:49:09 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 80627 invoked by uid 99); 1 May 2009 12:49:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 12:49:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO h57067.serverkompetenz.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 12:48:59 +0000 Received: from h57067.serverkompetenz.net (unknown [83.161.120.155]) by h57067.serverkompetenz.net (Postfix) with ESMTP id A20E680050 for <jbarnett@example.com>; Fri, 1 May 2009 12:48:38 +0000 (UTC) Received: from [83.161.120.155] (unknown [83.161.120.155]) by h57067.serverkompetenz.net (Postfix) with ESMTP for <jbarnett@example.com>; Fri, 1 May 2009 12:48:38 +0000 (UTC) Message-Id: <jbarnett@example.com> From: Andreas Gies <jbarnett@example.com> To: jbarnett@example.com In-Reply-To: <jbarnett@example.com> Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Some questions, Please help Date: Fri, 1 May 2009 14:48:38 +0200 References: <jbarnett@example.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org Hi there, please find comments inline... On May 1, 2009, at 12:10 AM, Websphere and ActiveMQ wrote: > > Today I have configured ActiveMQ and Websphere successfully, also I =20= > can send > message by my Application. > Note: I use JMS API to send/receive message. > > Now I have following questions. > 1. After I sent message successfully, login > http://localhost:8161/admin/queues.jsp, I can see there are 2 =20 > columns, one > is Messages Sent, another is Messages Received. The message I sent =20 > is in > Message Sent column, but when I click Browse link, I can not see any =20= > message > text, Why? > Are you sending a text message here ? - You could try and =20 programmatically use a queue browser to inspect the queue, just to make sure the message is =20= really there. > 2. When I use pure Java client to receive Message I just sent, I can =20= > not > receive anything, just null=EF=BC=8C why?? Scratching my head here. Is your receiver connected to the same broker ? This is where I am wondering what role Websphere has to play in your questions....do you have a bridge configured ? Are you expecting =20 messages to travel across from AMQ to Websphere ? > > > 3. If I send the same message twice, why ActiveMQ can not remove or =20= > override > the first one? every time I send the same message, I can see the =20 > number of > Messages Sent increased 1. Can I configure somewhere to reach it? > I don't quite get that comment. Do you mean a message with the same =20 content ? However, every time you the send method, technically new message is =20 created and sent. No message broker i know looks into the message to check =20 whether that message already has been sent. IMHO this would belong into the =20 application or better the mediation layer, where you could apply an idem potent =20 consumer pattern, if necessary. > Till now I have such questions because I use ActiveMQ first time. =20 > Please > help me, thanks in advance. > > Derrick > > --=20 > View this message in context: = http://www.nabble.com/Some-questions%2C-Please-help-tp23325248p23325248.ht= ml > Sent from the ActiveMQ - User mailing list jbarnett@example.com. > From usersjbarnett@example.com Fri May 01 13:39:29 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 43261 invoked from network); 1 May 2009 13:39:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 13:39:29 -0000 Received: (qmail 21520 invoked by uid 500); 1 May 2009 13:39:27 -0000 Delivered-To: jbarnett@example.com Received: (qmail 21412 invoked by uid 500); 1 May 2009 13:39:27 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 21379 invoked by uid 99); 1 May 2009 13:39:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 13:39:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 13:39:13 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1Lzsx2-0004jU-VJ for jbarnett@example.com; Fri, 01 May 2009 06:38:52 -0700 Message-ID: <jbarnett@example.com> Date: Fri, 1 May 2009 06:38:52 -0700 (PDT) From: nmittal <jbarnett@example.com> To: jbarnett@example.com Subject: Re: SimpleProducer example inherits from Runnable.. curious why? In-Reply-To: <jbarnett@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com References: <jbarnett@example.com> <jbarnett@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Understood. Thanks. Timothy Bish wrote: > > On Thu, 2009-04-30 at 13:11 -0700, nmittal wrote: >> Hi All, in the examples that come with the CMS distribution, I see the >> following... >> class SimpleProducer: public Runnable >> >> is there a reason why a producer has to inherit from Runnable. The run() >> function is called like any other functions. >> >> any insight is appreciated. >> >> thanks >> Nishant > > It doesn't really have to be, but that code is just a cut and paste from > the main example file in src/example/main.cpp. It doesn't hurt anything > that it does so it was never removed. > > Regards > Tim > > -- > Tim Bish > http://fusesource.com > http://timbish.blogspot.com/ > > > > > -- View this message in context: http://www.nabble.com/SimpleProducer-example-inherits-from-Runnable..-curious-why--tp23322600p23333245.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Fri May 01 13:45:21 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 46259 invoked from network); 1 May 2009 13:45:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 13:45:21 -0000 Received: (qmail 25608 invoked by uid 500); 1 May 2009 13:45:20 -0000 Delivered-To: jbarnett@example.com Received: (qmail 25553 invoked by uid 500); 1 May 2009 13:45:20 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 25543 invoked by uid 99); 1 May 2009 13:45:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 13:45:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 13:45:11 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1Lzt2o-0004wU-Nc for jbarnett@example.com; Fri, 01 May 2009 06:44:50 -0700 Message-ID: <jbarnett@example.com> Date: Fri, 1 May 2009 06:44:50 -0700 (PDT) From: nmittal <jbarnett@example.com> To: jbarnett@example.com Subject: CMS and Multithreading MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com X-Virus-Checked: Checked by ClamAV on apache.org below is an excerpt from the book "ActiveMQ in action"... The JMS spec specifically defines concurrency for various objects in the JMS API and requires that only a few objects support concurrent access. The ConnectionFactory, Connection and Destination objects are required to support concurrent access while the Session, the MessageProducer and the MessageConsumer objects do not support concurrent access. The point is that the Session, the MessageProducer and the MessageConsumer objects should not be shared across threads in a Java application. However, the the examples that come with ActiveMQ CPP... the onMessage function uses the session, consumer objects. I think the onMessage would be called in seperate threads for each message in the queue. So given that session and consumer classes are not threadsafe...is it correct to do so? thanks Nishant -- View this message in context: http://www.nabble.com/CMS-and-Multithreading-tp23333314p23333314.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Fri May 01 14:08:37 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 59386 invoked from network); 1 May 2009 14:08:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 14:08:37 -0000 Received: (qmail 50870 invoked by uid 500); 1 May 2009 14:08:36 -0000 Delivered-To: jbarnett@example.com Received: (qmail 50840 invoked by uid 500); 1 May 2009 14:08:36 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 50830 invoked by uid 99); 1 May 2009 14:08:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 14:08:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 14:08:28 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1LztPJ-00062d-6M for jbarnett@example.com; Fri, 01 May 2009 07:08:06 -0700 Message-ID: <jbarnett@example.com> Date: Fri, 1 May 2009 07:08:05 -0700 (PDT) From: nmittal <jbarnett@example.com> To: jbarnett@example.com Subject: CMS: Session, Destination MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com X-Virus-Checked: Checked by ClamAV on apache.org Hi All, If I am not mistaken, then destinations are created from Sessions. (session->createTopic() or session->createQueue()) Then how come, destinations are required to be thread safe while Sessions are not? thanks Nishant -- View this message in context: http://www.nabble.com/CMS%3A-Session%2C-Destination-tp23333648p23333648.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Fri May 01 14:48:02 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 77449 invoked from network); 1 May 2009 14:48:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 14:48:01 -0000 Received: (qmail 14985 invoked by uid 500); 1 May 2009 14:48:01 -0000 Delivered-To: jbarnett@example.com Received: (qmail 14962 invoked by uid 500); 1 May 2009 14:48:01 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 14952 invoked by uid 99); 1 May 2009 14:48:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 14:48:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 14:47:53 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1Lzu1U-0007XC-JL for jbarnett@example.com; Fri, 01 May 2009 07:47:32 -0700 Message-ID: <jbarnett@example.com> Date: Fri, 1 May 2009 07:47:32 -0700 (PDT) From: Bruce Loth <jbarnett@example.com> To: jbarnett@example.com Subject: ActiveMQ 5.2.0 + REST + java.lang.OutOfMemoryError MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com X-Virus-Checked: Checked by ClamAV on apache.org First off, I am a newbie when it comes to JMS & ActiveMQ. I have been looking into a messaging solution to serve as middleware for a message producer that will insert XML messages into a queue via HTTP POST. The producer is an existing system written in C++ that cannot be modified (so Java and the C++ API are out). Using the "demo" examples and some trial and error, I have cobbled together a working example of what I want to do (on a windows box). The web.xml I configured in a test directory under "webapps" specifies that the HTTP POST messages received from the producer are to be handled by the MessageServlet. I added a line for the text app in "activemq.xml" ('ow' is the test app dir): <webAppContext contextPath="/ow" resourceBase="${activemq.base}/webapps/ow" logUrlOnStart="true"/> I created a test script to "insert" messages into the queue which works well. The problem I am running into is that it as I continue to insert messages via REST/HTTP POST, the memory consumption and thread count used by ActiveMQ continues to rise (It happens when I have timely consumers as well as slow or non-existent consumers). When memory consumption gets around 250MB's and the thread count exceeds 5000 (as shown in windows task manager), ActiveMQ crashes and I see this in the log: Exception in thread "ActiveMQ Transport Initiator: vm://localhost#3564" java.lang.OutOfMemoryError: unable to create new native thread It is as if Jetty is spawning a new thread to handle each HTTP POST and the thread never dies. I did look at this page: http://activemq.apache.org/javalangoutofmemory.html and tried <memoryUsage limit="1 mb"/> but that didn't fix the problem (although I didn't fully understand the implications of the change either). Does anyone have any ideas? Thanks! - Bruce Loth PS - I included the "test message producer" python script below for what it is worth. I created batches of 100 messages and continued to run the script manually from the command line while watching the memory consumption and thread count of ActiveMQ in task manager. def foo(): import httplib, urllib body = "<?xml version='1.0' encoding='UTF-8'?>\n \ <ROOT>\n \ [snip: xml deleted to save space] </ROOT>" headers = {"content-type": "text/xml", "content-length": str(len(body))} conn = httplib.HTTPConnection("83.161.120.155:8161") conn.request("POST", "/ow/message/RDRCP_Inbox?type=queue", body, headers) response = conn.getresponse() print response.status, response.reason data = response.read() conn.close() ## end method definition ## Begin test code count = 0; while(count < 100): # Test with batches of 100 msgs count += 1 foo() -- View this message in context: http://www.nabble.com/ActiveMQ-5.2.0-%2B-REST-%2B-java.lang.OutOfMemoryError-tp23334284p23334284.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Fri May 01 15:29:14 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 99455 invoked from network); 1 May 2009 15:29:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 15:29:14 -0000 Received: (qmail 10600 invoked by uid 500); 1 May 2009 15:29:13 -0000 Delivered-To: jbarnett@example.com Received: (qmail 10577 invoked by uid 500); 1 May 2009 15:29:13 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 10567 invoked by uid 99); 1 May 2009 15:29:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 15:29:13 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO qw-out-1920.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 15:29:04 +0000 Received: by qw-out-1920.google.com with SMTP id 5so1786778qwc.26 for <jbarnett@example.com>; Fri, 01 May 2009 08:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=GpTOhNUsvWRO+FD+qtDasf1tSbZ1dyYbhoOp3eq2XzU=; b=nfWrevgxdNBJmqX2bkYrqVzgnO/TmWb41qOBexZv4u2gFmA0lCAyNh8LM/nj2rqgT7 LOCXAx1Uwj4caMxskFFREDVh9eDsZJL9VRz/kXZP51fZMcsFcTSdh4FIhMOFD7jsKK5V 9EzjqL/cKxIq+fvG0eP9GsmSsGDP8p4QHAaoE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=eTl9A90VaklL5eoMp41SMimmQ9O2wS0zxblxld8VNBYNBtsZNoT4skJBB8SXFWYxXl I2mcrJZ2IxqNEeBKInQzU1hGKGtR3rjvpgnJyx2kjLtnbZf0le5AzpG9LJfxdhQLuHYP hjHKUuIRZ29sHlHSCpEa/5mbRyduanZPsrRXE= Received: by 83.161.120.155 with SMTP id w13mr2016751qcn.62.1241191723770; Fri, 01 May 2009 08:28:43 -0700 (PDT) Received: from ?83.161.120.155? ([83.161.120.155]) by mx.google.com with ESMTPS id 6sm8323082ywp.44.283.161.120.155.28.40 (version=SSLv3 cipher=RC4-MD5); Fri, 01 May 2009 08:28:42 -0700 (PDT) Subject: Re: CMS and Multithreading From: Timothy Bish <jbarnett@example.com> To: jbarnett@example.com In-Reply-To: <jbarnett@example.com> References: <jbarnett@example.com> Content-Type: text/plain Date: Fri, 01 May 2009 11:28:34 -0400 Message-Id: <jbarnett@example.com> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Fri, 2009-05-01 at 06:44 -0700, nmittal wrote: > below is an excerpt from the book "ActiveMQ in action"... > The JMS spec specifically defines concurrency for various objects in the JMS > API and requires that only a few objects support concurrent access. The > ConnectionFactory, Connection and Destination objects are required to > support concurrent access while the Session, the MessageProducer and the > MessageConsumer objects do not support concurrent access. The point is that > the Session, the MessageProducer and the MessageConsumer objects should not > be shared across threads in a Java application. > > However, the the examples that come with ActiveMQ CPP... the onMessage > function uses the session, consumer objects. I think the onMessage would be > called in seperate threads for each message in the queue. So given that > session and consumer classes are not threadsafe...is it correct to do so? > > thanks > Nishant > While the spec defines that certain types be thread safe we've shrived to ensure that all operations on the CMS objects are thread safe. That being said I would advise showing constraint on overusing CMS objects in a method like onMessage as the time spent in that method delays delivery of messages, so you wouldn't want to start producing messages from onMessage for instance. Regards Tim. -- Tim Bish http://fusesource.com http://timbish.blogspot.com/ From usersjbarnett@example.com Fri May 01 15:30:49 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 560 invoked from network); 1 May 2009 15:30:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 15:30:49 -0000 Received: (qmail 12171 invoked by uid 500); 1 May 2009 15:30:48 -0000 Delivered-To: jbarnett@example.com Received: (qmail 12141 invoked by uid 500); 1 May 2009 15:30:48 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 12131 invoked by uid 99); 1 May 2009 15:30:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 15:30:48 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-qy0-f171.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 15:30:39 +0000 Received: by qyk1 with SMTP id 1so4870119qyk.22 for <jbarnett@example.com>; Fri, 01 May 2009 08:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=DwZVaMyk2wO87LHLFf2e7Ri0NA1RUl4dQ8To4883Tdo=; b=dFiofIfOpWWKa2M3cggNEnpOjtDZHT2C9MYkVj2DEOXp1pDr+julmAORHInB8GbGVl DM4WV2fJw6wTvi3PiMg729piZ6fmHPTswMu0x7/5LC6UDqiLqiTfZ/jcamewWF7HTCpo Y2qdqg6LBzztkvsoNwcp/JkTkVlWStru7Js+I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=URTVQnovxLlZGw6dKKy7FAmD/dYuy9l8TR1+tTB7iD3Wnsjf6Vt1a4aNGjpMDQlxgC B8lP7DcOdmV4v5QwGypLQB2Ajh2MV1XcTxe0Z584WXYNHiKr5w5ZBM1KHOtgsNGzGBlz rDqB+QSA9NZFD83Q4RLlW7KmfN4KsL8nwIIzk= Received: by 83.161.120.155 with SMTP id f10mr2166858qcm.71.1241191818418; Fri, 01 May 2009 08:30:18 -0700 (PDT) Received: from ?83.161.120.155? ([83.161.120.155]) by mx.google.com with ESMTPS id 9sm8351315ywf.49.283.161.120.155.30.15 (version=SSLv3 cipher=RC4-MD5); Fri, 01 May 2009 08:30:17 -0700 (PDT) Subject: Re: CMS: Session, Destination From: Timothy Bish <jbarnett@example.com> To: jbarnett@example.com In-Reply-To: <jbarnett@example.com> References: <jbarnett@example.com> Content-Type: text/plain Date: Fri, 01 May 2009 11:30:10 -0400 Message-Id: <jbarnett@example.com> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Fri, 2009-05-01 at 07:08 -0700, nmittal wrote: > Hi All, > If I am not mistaken, then destinations are created from Sessions. > (session->createTopic() or session->createQueue()) > > Then how come, destinations are required to be thread safe while Sessions > are not? > > thanks > Nishant Mainly because Destinations are a more general purpose object which could be shared amongst several MessageConsumers or MessageProducers in a single application. Typically only one thread uses the Session to create the application jbarnett@example.com. Regards Tim. -- Tim Bish http://fusesource.com http://timbish.blogspot.com/ From usersjbarnett@example.com Fri May 01 15:42:59 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 19716 invoked from network); 1 May 2009 15:42:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 May 2009 15:42:59 -0000 Received: (qmail 43825 invoked by uid 500); 1 May 2009 15:42:57 -0000 Delivered-To: jbarnett@example.com Received: (qmail 43797 invoked by uid 500); 1 May 2009 15:42:57 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 43769 invoked by uid 99); 1 May 2009 15:42:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 15:42:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 15:42:48 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1Lzusd-0001Bc-Lj for jbarnett@example.com; Fri, 01 May 2009 08:42:27 -0700 Message-ID: <jbarnett@example.com> Date: Fri, 1 May 2009 08:42:27 -0700 (PDT) From: nmittal <jbarnett@example.com> To: jbarnett@example.com Subject: Re: CMS and Multithreading In-Reply-To: <jbarnett@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com References: <jbarnett@example.com> <jbarnett@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Thats awesome. saves a lot of time for me as a developer trying to do my own synchronization. thanks Tim. Timothy Bish wrote: > > On Fri, 2009-05-01 at 06:44 -0700, nmittal wrote: >> below is an excerpt from the book "ActiveMQ in action"... >> The JMS spec specifically defines concurrency for various objects in the >> JMS >> API and requires that only a few objects support concurrent access. The >> ConnectionFactory, Connection and Destination objects are required to >> support concurrent access while the Session, the MessageProducer and the >> MessageConsumer objects do not support concurrent access. The point is >> that >> the Session, the MessageProducer and the MessageConsumer objects should >> not >> be shared across threads in a Java application. >> >> However, the the examples that come with ActiveMQ CPP... the onMessage >> function uses the session, consumer objects. I think the onMessage would >> be >> called in seperate threads for each message in the queue. So given that >> session and consumer classes are not threadsafe...is it correct to do so? >> >> thanks >> Nishant >> > > While the spec defines that certain types be thread safe we've shrived > to ensure that all operations on the CMS objects are thread safe. That > being said I would advise showing constraint on overusing CMS objects in > a method like onMessage as the time spent in that method delays delivery > of messages, so you wouldn't want to start producing messages from > onMessage for instance. > > Regards > Tim. > > -- > Tim Bish > http://fusesource.com > http://timbish.blogspot.com/ > > > > > -- View this message in context: http://www.nabble.com/CMS-and-Multithreading-tp23333314p23335072.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Sat May 02 15:10:36 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 27575 invoked from network); 2 May 2009 15:10:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 May 2009 15:10:36 -0000 Received: (qmail 7235 invoked by uid 500); 2 May 2009 15:10:35 -0000 Delivered-To: jbarnett@example.com Received: (qmail 7174 invoked by uid 500); 2 May 2009 15:10:35 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 7164 invoked by uid 99); 2 May 2009 15:10:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 May 2009 15:10:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 May 2009 15:10:26 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1M0Gqr-0008Mh-Fl for jbarnett@example.com; Sat, 02 May 2009 08:10:05 -0700 Message-ID: <jbarnett@example.com> Date: Sat, 2 May 2009 08:10:05 -0700 (PDT) From: shridharv <jbarnett@example.com> To: jbarnett@example.com Subject: Re: Q Consumers stop receiving messages In-Reply-To: <jbarnett@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com References: <jbarnett@example.com> <jbarnett@example.com> <jbarnett@example.com> <jbarnett@example.com> <jbarnett@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, Was this issue figured out ? We have the same problem, wherein a consumer stops receiving further messages, as it has not committed after receiving around 1000 messages. We cannot commit until we get a set of messages and hence the consume is waiting indefinitely. Any suggestions welcome. AmQ 5.2 in Windows. ----------------------------------------------- IBeaumont wrote: > > I'm sending a mixture of persistent and non persistent messages. > > I have seen a negative queue count before so will look at the trunk. > > Can't see anything unusal in JConsole, but I have just downlaoded the > source and in the ActiveMQMessageConsumer.receiveNoWait there are these > lines... > if (info.getPrefetchSize() == 0) { > md = dequeue(-1); // We let the broker let us know when we > // timeout. > } else { > md = dequeue(0); > } > > So that explains why my consumes seem to hang when things go wrong - > because they wait forever because I have a prefetchSize of zero. > > I've now changed me code so that instead of using receiveNoWait, I'll use > "receive" with a short timeout. Hopefully then things will timeout and > messages will contiue to be processed. I'll then need to find out if all > any messages get skipped. ALthough that doesn't help find the cause. > > > > > > Gary Tully wrote: >> >> Your use case sounds typical and reasonable but just to understand, >> are you sending persistent and non persistent messages to the same >> queue? >> >> Can you check in Jconsole, in the ActiveMQ BrokerView - Queues and >> Subscriptions: >> Do the queue metrics (size, dispatched) look as expected? >> A negative queue size is indicative of a issue that was resolved on >> trunk recently. If you see that you could try a snapshot. >> >> Re: prefetch==0. ok, yea, you need that if you want to depende on >> redelivered(). tThat is a known issue, prefetched messages that are >> not consumed are deemed redelivered when they are dispatched to the >> next consumer. >> ActiveMQ redelivered means delivered to a amq consumer, not delivered >> to the end user. see: >> https://issues.apache.org/activemq/browse/AMQ-1952 >> >> 2009/1/13 IBeaumont <jbarnett@example.com>: >>> >>> Hi Gary, >>> Thanks for the feedback. >>> As you can see from my stack traces earlier in jconsole, the consumers >>> are >>> stuck on pulling messages from the queues, they are in: >>> org.apache.activemq.MessageDispatchChannel.dequeue >>> >>> >>> The reason I've ended up with the settings I have as so far they seem to >>> be >>> give me the desired results (apart from this last problem). Maybe it >>> would >>> be easier to explain the behaviur I need and someone might be able to >>> advise >>> on the best settings... >>> >>> So most messages sent are persistent, and I need to process every >>> message - >>> I can't afford to drop any. I may have slow "consumers", and I might be >>> putting messages on to the queues at a far greater rate than they can >>> get >>> processed (I want any available harddisk space to be used for message >>> storage). There are a a number of consumers and producers, and a number >>> of >>> different queues. >>> >>> >>> The pre-fetch size was set to zero to overcome an issue I was having >>> with >>> redelivery count. Our application uses the JMS redelivered to see if it >>> has >>> already tried processing the message. Using a pre-fetch size bigger >>> than 0 >>> was causing me some issues with this. Out of interest, do you know what >>> happens to messages that are pre-fetched and then the consumer dies. Do >>> they get flagged as redelivered when a new consumer picks them up? >>> >>> >>> >>> >>> Gary Tully wrote: >>>> >>>> A good place to start is with JCosole, to have a look at the queues >>>> and consumers to see how many messages are currently in the queues. >>>> >>>>>The broker is configured with producerFlowControl="false", using TCP, a >>>>>pre-fetch size of 0 and I've also set sendFailIfNoSpace="true". >>>>> >>>> The sendFailIfNoSpace is disabled if producerFlowControl==false, so >>>> your producers will hang if memory for the queues are exhausted. >>>> sendFailIfNoSpace is considered a flowControl mechanism that does not >>>> block so it needs producerFlowControl to be enabled (the default) and >>>> no producer window to be set (also the default). >>>> >>>> Just a thought, but is it possible that the consumers are blocking >>>> when trying to "stick messages" back on a queue? >>>> >>>> Out of interest, why are you using prefetch==0? >>>> >>>> 2009/1/13 IBeaumont <jbarnett@example.com>: >>>>> >>>>> I've got a fairly complex app, that takes msgs, processing them and >>>>> sticks >>>>> them on the same or different queues. >>>>> >>>>> The queues are pre-loaded with persistent messages before the >>>>> application >>>>> starts (50000). Once it starts processing things work fine for a >>>>> while >>>>> and >>>>> then the consumers stop receiving any messages. I have a 4 consumers >>>>> for >>>>> each queue, and there are 3 different queues. >>>>> >>>>> Looking at jconsole all consumes are waiting here: >>>>> >>>>> State: WAITING on java.lang.Object@1801d4a >>>>> Total blocked: 20 Total waited: 158 >>>>> >>>>> Stack trace: >>>>> java.lang.Object.wait(Native Method) >>>>> java.lang.Object.wait(Object.java:485) >>>>> org.apache.activemq.MessageDispatchChannel.dequeue(MessageDispatchChannel.java:75) >>>>> org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:412) >>>>> org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:560) >>>>> com.xalert.server.queuing.SessionManager.getAlert(SessionManager.java:236) >>>>> >>>>> >>>>> If I look at the broker (and I'm not really sure what to look at >>>>> here), >>>>> the >>>>> thread for my queue that should be dispatching messages looks like >>>>> this >>>>> Name: QueueThread:queue://csPIQ >>>>> State: WAITING on >>>>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@b0a518 >>>>> Total blocked: 2,365 Total waited: 6,717 >>>>> >>>>> Stack trace: >>>>> sun.misc.Unsafe.park(Native Method) >>>>> java.util.concurrent.locks.LockSupport.park(Unknown Source) >>>>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown >>>>> Source) >>>>> java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) >>>>> java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) >>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >>>>> java.lang.Thread.run(Unknown Source) >>>>> >>>>> The broker is configured with producerFlowControl="false", using TCP, >>>>> a >>>>> pre-fetch size of 0 and I've also set sendFailIfNoSpace="true". >>>>> >>>>> Any ideas on what my problem is or how/where I look in ActiveMQ to >>>>> find >>>>> the >>>>> cause, or if the problem is with the consumer. >>>>> >>>>> TIA >>>>> Ian >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://www.nabble.com/Q-Consumers-stop-receiving-messages-tp21438163p21438163.html >>>>> Sent from the ActiveMQ - User mailing list jbarnett@example.com. >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> http://blog.garytully.com >>>> >>>> Open Source SOA >>>> http://FUSESource.com >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Q-Consumers-stop-receiving-messages-tp21438163p21440240.html >>> Sent from the ActiveMQ - User mailing list jbarnett@example.com. >>> >>> >> >> >> >> -- >> http://blog.garytully.com >> >> Open Source SOA >> http://FUSESource.com >> >> > > -- View this message in context: http://www.nabble.com/Q-Consumers-stop-receiving-messages-tp21438163p23346978.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Sun May 03 07:30:47 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 67923 invoked from network); 3 May 2009 07:30:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 May 2009 07:30:47 -0000 Received: (qmail 2403 invoked by uid 500); 3 May 2009 07:30:46 -0000 Delivered-To: jbarnett@example.com Received: (qmail 2326 invoked by uid 500); 3 May 2009 07:30:45 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 2316 invoked by uid 99); 3 May 2009 07:30:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 07:30:45 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 07:30:37 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1M0W9Q-0005u4-VP for jbarnett@example.com; Sun, 03 May 2009 00:30:16 -0700 Message-ID: <jbarnett@example.com> Date: Sun, 3 May 2009 00:30:16 -0700 (PDT) From: riteshtijoriwala <jbarnett@example.com> To: jbarnett@example.com Subject: How to preserve order of messages in Network of Brokers? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com X-Virus-Checked: Checked by ClamAV on apache.org I have two consumers C1 and C2 and two brokers B1 and B2 that see each other. I have one producer P1. P1 is connected initially to B1 and C2 is connected to B1. C1 is connected to B2. The initial start is as follows: P1 produces 1, 2, 3, 4, 5, 6, (B1 failed), 7, 8, 9, 10. C1 gets 1, 3, 5, 7, 9, 8 C2 gets 2, 4, 6, (B1 failed), 10 As seen above, I fail B1. P1 and C2 failover to B2. But now the strange things happen. C1 starts to get messages out of order. Is there a way to prevent this? How can I ensure that in case of broker failure, after failover has occurred, consumers will receive messages in order. To be specific, how can I assure that msg # 8 is processed before message # 9 & 10? -- View this message in context: http://www.nabble.com/How-to-preserve-order-of-messages-in-Network-of-Brokers--tp23353328p23353328.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Sun May 03 11:18:52 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 15153 invoked from network); 3 May 2009 11:18:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 May 2009 11:18:51 -0000 Received: (qmail 74468 invoked by uid 500); 3 May 2009 11:18:50 -0000 Delivered-To: jbarnett@example.com Received: (qmail 74416 invoked by uid 500); 3 May 2009 11:18:50 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 74406 invoked by uid 99); 3 May 2009 11:18:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 11:18:50 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 11:18:41 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1M0Zi8-0004kO-I0 for jbarnett@example.com; Sun, 03 May 2009 04:18:20 -0700 Message-ID: <jbarnett@example.com> Date: Sun, 3 May 2009 04:18:20 -0700 (PDT) From: volante <jbarnett@example.com> To: jbarnett@example.com Subject: Stomp transactions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com X-Virus-Checked: Checked by ClamAV on apache.org I'm a bit confused about some behaviour I'm seeing when doing transactions with stomp. First my producer puts 3 messages into MyQueue: MSG1, MSG2, MSG3 Then I start up my stomp consumer which does this: - CONNECT (ack = client) - SUBSCRIBE MyQueue - BEGIN tx1 - <reads a message> message-id: MSG1 - ACK message-id: MSG1 At this point, the message appears to be dequeued when I look at the queue via the admin web interface (that seems correct as it is locked by the transaction?). Now, I kill my stomp client process, so the TCP connection is closed, mid-transaction. The message now re-appears in the queue when looking at the admin web interface (makes sense to me..) Now the strange behavior is, when I re-run my stomp client, and do the same series of steps, I now receive MSG2. If I kill repeat the process I will then receive MSG3 and then finally it will block with no messages to receive. I would have thought that since the transaction never finished and my TCP connection was terminated, the ACK should have been rolled back and my next client that connects should receive a retransmission of MSG1. Can anyone explain what is going on here? Thanks -- View this message in context: http://www.nabble.com/Stomp-transactions-tp23354832p23354832.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Sun May 03 11:52:19 2009 Return-Path: <usersjbarnett@example.com> Delivered-To: jbarnett@example.com Received: (qmail 18460 invoked from network); 3 May 2009 11:52:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 May 2009 11:52:19 -0000 Received: (qmail 83803 invoked by uid 500); 3 May 2009 11:52:18 -0000 Delivered-To: jbarnett@example.com Received: (qmail 83743 invoked by uid 500); 3 May 2009 11:52:18 -0000 Mailing-List: contact jbarnett@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:jbarnett@example.com> List-Unsubscribe: <mailto:jbarnett@example.com> List-Post: <mailto:jbarnett@example.com> List-Id: <users.activemq.apache.org> Reply-To: jbarnett@example.com Delivered-To: mailing list jbarnett@example.com Received: (qmail 83733 invoked by uid 99); 3 May 2009 11:52:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 11:52:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbarnett@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO kuber.nabble.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 11:52:10 +0000 Received: from isper.nabble.com ([83.161.120.155]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from <jbarnett@example.com>) id 1M0aEX-0005j2-BX for jbarnett@example.com; Sun, 03 May 2009 04:51:49 -0700 Message-ID: <jbarnett@example.com> Date: Sun, 3 May 2009 04:51:49 -0700 (PDT) From: volante <jbarnett@example.com> To: jbarnett@example.com Subject: Re: Stomp transactions In-Reply-To: <jbarnett@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jbarnett@example.com References: <jbarnett@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Further to this, it appears that if I restart activemq, new stomp clients will then receive the messages as expected (they are persistent messages). If I send an ABORT before disconnecting the stomp connection, everything works as expected and no restart is required. It looks like when I close the TCP connection mid-transaction, the message remains locked. Is this a bug or is there a configurable timeout? volante wrote: > > I'm a bit confused about some behaviour I'm seeing when doing transactions > with stomp. > > First my producer puts 3 messages into MyQueue: MSG1, MSG2, MSG3 > > Then I start up my stomp consumer which does this: > > - CONNECT (ack = client) > - SUBSCRIBE MyQueue > - BEGIN tx1 > - <reads a message> message-id: MSG1 > - ACK message-id: MSG1 > > At this point, the message appears to be dequeued when I look at the queue > via the admin web interface (that seems correct as it is locked by the > transaction?). > Now, I kill my stomp client process, so the TCP connection is closed, > mid-transaction. > The message now re-appears in the queue when looking at the admin web > interface (makes sense to me..) > > Now the strange behavior is, when I re-run my stomp client, and do the > same series of steps, I now receive MSG2. If I kill repeat the process I > will then receive MSG3 and then finally it will block with no messages to > receive. > > I would have thought that since the transaction never finished and my TCP > connection was terminated, the ACK should have been rolled back and my > next client that connects should receive a retransmission of MSG1. > > Can anyone explain what is going on here? > > Thanks > -- View this message in context: http://www.nabble.com/Stomp-transactions-tp23354832p23355062.html Sent from the ActiveMQ - User mailing list jbarnett@example.com. From usersjbarnett@example.com Sun May
{'source': 'Apache Software Foundation Public Mail Archives'}