|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ java api - how to post messages to Topics |
« View previous topic :: View next topic » |
Author |
Message
|
Lukas |
Posted: Wed Apr 09, 2014 7:32 am Post subject: MQ java api - how to post messages to Topics |
|
|
Newbie
Joined: 25 May 2012 Posts: 5
|
Hello
Can someone help me understand how to use parameters topicName and topicObject of method accessTopic in class MQQueueManager? What is possible with these parameters?
public MQTopic accessTopic(String topicName,
String topicObject,
int contact admin,
int options)
throws MQException
In MQ Explorer, I have created a topic as follows:
Topic name: my_new_topic
Topic string: my_new_string
I also created a subscription that places messages received in this topic onto a local queue.
At first I thought my_new_topic was the topicName, and my_new_string was the topicObject. But, this is incorrect.
Then I looked at the MQPubSubApiSample.java sample that comes with MQ Explorer v7, and it uses the put method of class MQQueueManager to place a message on a topic. This worked when I passed in the Topic name from the MQ Explorer Topic GUI, into the destinationName parameter. But I don't see how this approach can involve a TopicObject.
put(int type, String destinationName, MQMessage message)
http://imagebin.org/304768
http://imagebin.org/304771
http://imagebin.org/304772
Regards,
Lukas |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 10, 2014 4:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Looking at your explorer view,you created a topic object with name my_new_topic. The topic string was my_new_string.
If not using a topic object you would publish directly to my_new_string...
So I really don't understand your question...
It seems there is some confusion here between topic, topic string, and topic object...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Lukas |
Posted: Thu Apr 10, 2014 7:55 am Post subject: |
|
|
Newbie
Joined: 25 May 2012 Posts: 5
|
"Some confusion" is an understatement. After many hours of in depth studying and meditation atop a mountain, I came to know the nature of MQ topics
The problem solve itself, I'm not sure how. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|