Re: How to register consumer with the same name for the different topic
"Hemant Gaur" <[email protected]> 13 Dec 2006 11:44:49 -0000
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
I have been able to get this fixed in the Jmeter.
Actually the calls made for
connection.setClientID(idGenerator.generateId());//not supported by OpenJMS
are removed from the OpenJMS code path in the org.activemq.sampler.Consumer
And added the UniqueID to the client name while creating the subscription.
<<consumer = ((TopicSession)session).createDurableSubscriber(topic, getClass().getName());
>>consumer = ((TopicSession)session).createDurableSubscriber(topic, getClass().getName()+idGenerator.generateId());
Ensure that the consumer sampler is the first Member of the test ThreadGroup and the tests run fine.
However on stressting the OpenJMS with more than one (2 Publishers, 2Subscribers, 2 topics, persistent, Durable, tcp) subscribers/Publishers there are SqlServer deadlock exceptions printed on the OpenJMS console.
OpenJMS selects the victim and reruns the transactions but the consumers are badly affected from this and the messages throughput is drastacally decresed to 2-3 messages/Sec.
17:16:37.440 ERROR [Scheduler-Worker-6] - Error in SentMessageCache.process
org.exolab.jms.persistence.PersistenceException:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Tra
nsaction (Process ID 54) was deadlocked on {lock} resources with another process
and has been chosen as the deadlock victim. Rerun the transaction.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unkn
own Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Sour
ce)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown S
ource)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown So
urce)
at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown So
urce)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Dele
gatingPreparedStatement.java:205)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Dele
gatingPreparedStatement.java:205)
at org.exolab.jms.persistence.MessageHandles.removeMessageHandle(Message
Handles.java:352)
at org.exolab.jms.persistence.RDBMSAdapter.removeMessageHandle(RDBMSAdap
ter.java:495)
at org.exolab.jms.messagemgr.MessageHandleFactory.destroyPersistentHandl
e(MessageHandleFactory.java:361)
at org.exolab.jms.server.SentMessageCache.process(SentMessageCache.java:
146)
at org.exolab.jms.server.JmsServerSession.onMessage(JmsServerSession.jav
a:949)
at org.exolab.jms.messagemgr.TopicConsumerEndpoint.deliverMessages(Topic
ConsumerEndpoint.java:193)
at org.exolab.jms.messagemgr.ConsumerEndpoint.run(ConsumerEndpoint.java:
425)
at org.exolab.core.threadPool.ThreadPoolWorker.runIt(ThreadPoolWorker.ja
va:191)
at org.exolab.core.threadPool.ThreadPoolWorker.runWork(ThreadPoolWorker.
java:178)
at org.exolab.core.threadPool.ThreadPoolWorker.access$000(ThreadPoolWork
er.java:67)
at org.exolab.core.threadPool.ThreadPoolWorker$1.run(ThreadPoolWorker.ja
va:122)
at java.lang.Thread.run(Thread.java:595)
Tim, Any thoughts on that. Is this the known issue with the 7.6.1 release version. What else can I try ?
Thanks,
Hemant
On Wed, 13 Dec 2006 Hemant Gaur wrote :
>Looking into OpenJMS code it seems that this is not supported.
>The setClinetID call I can see in the JMeter ConsumerSampler but I this is not supported in OpenJMS Release version.
>So the consumer name(classs Name) is taken which conflicts.
>1.) connection.setClientID(idGenerator.generateId());
>The set ClientID is not supported in the openJMS.
>
>2.) consumer = ((TopicSession)session).createDurableSubscriber(topic, getClass().getName());
>
>I think I need to do some changes in the JMEter to get this running.
>Will keep you updated once I get this working.
>
>Regards,
>Hemant Gaur
>
>On Tue, 12 Dec 2006 Tim Anderson wrote :
> >Hemant Gaur wrote:
> >>
> >>Hi,
> >>For the JMeter tests on the OpenJMS release version , I tried to put the configuration for 5 topics, 5 Publishers , 5 subscribers.
> >>
> >>There was the error in the jmeter log as the OpenJMS did not allowed creating the consumer for the same name.
> >>
> >>2006/12/12 15:49:32 ERROR - org.activemq.sampler.Consumer: Error running consumer javax.jms.JMSException: Failed to unsubscribe subscriber org.activemq.sampler.Consumer since is still active
> >>at org.exolab.jms.server.JmsServerSession.unsubscribe(JmsServerSession.java:881)
> >>at org.exolab.jms.server.JmsServerSession.createSubscriber(JmsServerSession.java:758)
> >>at org.exolab.jms.server.mipc.IpcJmsSessionConnection.createSubscriber(IpcJmsSessionConnection.java:588)
> >>at org.exolab.jms.server.mipc.IpcJmsSessionConnection.notify(IpcJmsSessionConnection.java:165)
> >>at org.exolab.jms.server.mipc.IpcJmsReceiver.notify(IpcJmsReceiver.java:100)
> >>at org.exolab.jms.server.mipc.IpcServerChannel.run(IpcServerChannel.java:161)
> >>
> >>
> >>Are there anyworkarounds/configuration settings for this to be resolved. Publishers are working fine for the 5 topics.
> >>
> >In OpenJMS, subscription names must be unique.You'll need to configure JMeter to use a different subscription name
> >per durable subscriber.
> >
> >-Tim
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys - and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>openjms-user mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/openjms-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user