ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » XMS Pub/Sub on linux

Post new topic  Reply to topic
 XMS Pub/Sub on linux « View previous topic :: View next topic » 
Author Message
kun.leeing
PostPosted: Mon Jan 05, 2009 1:08 am    Post subject: XMS Pub/Sub on linux Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

Hi, experts.
I encountered a question about XMS.

simplified code like this:

Code:
pConnFact = new xms::ConnectionFactory();
pConnFact->setIntProperty(XMSC_CONNECTION_TYPE, XMSC_CT_WMQ);
pConnFact->setIntProperty(XMSC_WMQ_PORT, 1415);
pConnFact->setIntProperty(XMSC_WMQ_BROKER_VERSION, 1);
pConnFact->setIntProperty(XMSC_WMQ_CONNECTION_MODE, XMSC_WMQ_CM_CLIENT);
pConnFact->setStringProperty(XMSC_WMQ_HOST_NAME, "192.168.0.107");
pConnFact->setStringProperty(XMSC_WMQ_QUEUE_MANAGER, "QMANAGER");pConnFact->setStringProperty(XMSC_WMQ_CHANNEL,"SERVERCONN.CHANNEL");
conn = pConnFact->createConnection();
expLsr.connected(xmsTRUE);
conn.setExceptionListener(&expLsr);
sess = conn.createSession(xmsFALSE, XMSC_AUTO_ACKNOWLEDGE);
dest = xms::Destination("topic://SAC.CLIENTS.RECV");
consumer = sess.createConsumer(dest);


it goes through until the last line 'sess.createConsumer(dest)' and then hold a long time at the line before throw the following error

Exception:
ErrorData =
ErrorCode = 30 (XMS_E_PROTOCOL_ERROR)
JMS Type = 1 (XMS_X_GENERAL_EXCEPTION)
Linked Exception:
ErrorData = MQGET(Q=SYSTEM.JMS.REPORT.QUEUE,QMGR=ZH110.SACRIFICED.QMANAGER)
ErrorCode = 2033 (MQRC_NO_MSG_AVAILABLE)
JMS Type = 1 (XMS_X_GENERAL_EXCEPTION)

how can it be solved?
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Jan 05, 2009 2:30 am    Post subject: Re: XMS Pub/Sub on linux Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kun.leeing wrote:
how can it be solved?


By publishing new topics endlessly?

Why is this a problem?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kun.leeing
PostPosted: Wed Jan 14, 2009 4:38 pm    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

Following the code above, i have the message receiving code,but
the code will not pass the line of createConsumer(Topicstring) and throw the error above.

if i change Topicstring to Queue name like 'queue:///queue.lqueue', it will work, but topicstring give the error.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Jan 14, 2009 9:54 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kun.leeing wrote:
Following the code above, i have the message receiving code,but
the code will not pass the line of createConsumer(Topicstring) and throw the error above.

if i change Topicstring to Queue name like 'queue:///queue.lqueue', it will work, but topicstring give the error.

kun.leeing wrote:
dest = xms::Destination("topic://SAC.CLIENTS.RECV");
consumer = sess.createConsumer(dest);

Don't know much about that piece of code...
Have you tried:
Code:
String topicString = "topic://SAC.CLIENTS.RECV"; //uri form of the topic
xms::Destination mydest = sess.createTopic(topicString); //creating the topic using the uri form
consumer=sess.createConsumer(mydest);


http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaw.doc/uj25070_.htm

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kun.leeing
PostPosted: Wed Jan 14, 2009 10:16 pm    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

Thanks, fjb_saper.

I'll try it.
Back to top
View user's profile Send private message Send e-mail
kun.leeing
PostPosted: Tue Jan 20, 2009 6:12 pm    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

the problem remain.

And this time I fixed MQ 6.0.2.5 patch,but it didn't seem to work.

It still can not create consumer for pub/sub app.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Jan 21, 2009 3:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kun.leeing wrote:
the problem remain.

And this time I fixed MQ 6.0.2.5 patch,but it didn't seem to work.

It still can not create consumer for pub/sub app.

Remarkably your topic name looks like a queue name.
Check out the URI form of topics. The queue name has nothing at all to do with the topic. Can you try with a topic name that has not "." in it?
Topic separators should be "/" and not "." ....

As well the Uri form allows you to specify a delivery queue. However this still needs to be in form of SYSEM.JMS.* something. java manual, pub/sub manual
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kun.leeing
PostPosted: Wed Jan 21, 2009 6:14 am    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

Thanks for your reply,saper.

That's really a problem.

And I change it to the a topic string like 'topic://Center' ,but the question still is not resolved.

Pub/Sub consumer can not be created. Oddly, the consumer with queue destination can work correctly.Is this a bug on ia94 or anything I do not make?
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Jan 21, 2009 2:21 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It should work right.
For a subscription to go to a specific queue the uri should look something like this:

"topic://mytopic/#?brokerDurSubQueue=SYSTEM.JMS.D.PUBLIB&brokerVersion=1"
Here SYSTEM.JMS.D.PUBLIB is a alias for the real queue.
This was done because the queue name "HAS" to start with "SYSTEM.JMS.D."

Enjoy

Nota: I believe I used the wildcard chars for Version 2 in my topic...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kun.leeing
PostPosted: Tue Feb 10, 2009 6:49 am    Post subject: Reply with quote

Disciple

Joined: 27 Sep 2008
Posts: 171

Oh, I must say sorry,saper.

It's my false.

But now , I know how to do this.

Thanks for your help.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » XMS Pub/Sub on linux
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.