Author |
Message
|
wilsonjohn24 |
Posted: Fri Oct 05, 2007 5:58 am Post subject: Publishing JMS ( non JNDI) - noreg |
|
|
 Voyager
Joined: 02 Feb 2007 Posts: 93 Location: Scotland
|
Hi,
Using standalone JMS client to publish onto MQ pub/subs engine, not using JNDI defined factories.
I cant publish a topic via the JMS client, but I can do so via mqmonntp.
When I redirect and compare both message the "noreg" is checked on the JMS message but no on the mqmonntp message.
How can I set this value on JMS?
I belive the value c value is MQPS_NO_REGISTRATION!
thanks, |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 05, 2007 7:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What does it mean "can't publish"? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wilsonjohn24 |
Posted: Fri Oct 05, 2007 7:11 am Post subject: |
|
|
 Voyager
Joined: 02 Feb 2007 Posts: 93 Location: Scotland
|
Cant Publish= Program exits OK no JMS/MQ errors.
No errors in Event Logs etc
But basically the topic is not listed by amqspsd!
If I manually override the publish queue in the factory, then view the message with RFHUtil, change the value of "no reg" (pub/sub panel), then forward to the correct publish queue, the topic is registed fine.
Hence the only change is "no reg" true -> false
The conclusion I came to is that in my JMS client I need to send the message with no reg set to false. But thats my difficulty, I cant figure out which JMS property corresponds to "no reg".
cheers |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 05, 2007 2:22 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wilsonjohn24 wrote: |
The conclusion I came to is that in my JMS client I need to send the message with no reg set to false. But thats my difficulty, I cant figure out which JMS property corresponds to "no reg".
cheers |
Well create the message with RFHUTIL and send it to some queue. Then receive it in JMS and inspect it for all its attributes.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 05, 2007 4:32 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Also...
There's a big difference between a Publish command that doesn't work, and a Register Publish command that doesn't work.
I personally would only worry about the former, and not the later. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wilsonjohn24 |
Posted: Sat Oct 06, 2007 5:18 am Post subject: |
|
|
 Voyager
Joined: 02 Feb 2007 Posts: 93 Location: Scotland
|
fjb_saper:
Tried that one. When I read in from the queue via JMS I could not find the property.
Jefflowery:
It am trying to get a publish ( with emplicit registration) to work.
 |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Oct 06, 2007 8:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Do subscribers receive messages?
If yes, then how important is it that the registration occur? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wilsonjohn24 |
Posted: Sat Oct 06, 2007 11:31 pm Post subject: |
|
|
 Voyager
Joined: 02 Feb 2007 Posts: 93 Location: Scotland
|
The Subscribers part does not work- as the publication is never registered as the publication has the value "no reg" set to true. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Oct 07, 2007 4:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't understand why there would be any relationship at all between the publishers and the subscribers.
It's not necessary for a publisher to be registered, in order to publish messages.
In no way should subscribers be checking if someone is registered to publish on a particular topic or not.
In general, the only value of a registered publisher over an unregistered publisher is that an admin can see that a registered publisher exists in some way.
To be clear, in your code you are NOT using createTemporaryTopic(), yes? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wilsonjohn24 |
Posted: Sun Oct 07, 2007 11:50 pm Post subject: |
|
|
 Voyager
Joined: 02 Feb 2007 Posts: 93 Location: Scotland
|
Hi,
I assume I can publish a topic that has no subscribers listening?
I just want to publish a topic from JMS- "registering publishers" is the reason I assume the topic does not get published.
- As a general question how in JMS can I set the No reg flag?
- Has anyone done a publish (none JNDI) from JMS
Apologies if I have missed the point jefflowrey, I appreciate your effort.
Last edited by wilsonjohn24 on Sun Oct 07, 2007 11:53 pm; edited 1 time in total |
|
Back to top |
|
 |
wilsonjohn24 |
Posted: Sun Oct 07, 2007 11:52 pm Post subject: |
|
|
 Voyager
Joined: 02 Feb 2007 Posts: 93 Location: Scotland
|
So a un reg topic would still exist - but no be visible via the admin tools?
Also I dont use temp queues.
John |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 08, 2007 12:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't know how to set the register flag from JMS. I spent a bit of time looking, but didn't see anything. Also, you're not registering the topic, you're registering the publisher.
You can publish a message on a topic that has no subscribers. It doesn't go anywhere, or leave any mark on the system in general.
Topics themselves don't really "exist" in the pub/sub part of the system, except as an attribute of a message. If, however, you're using the Message Broker Pub/Sub and using a User Name Server, then you can create access control lists for topics - and so in that particular case they do exist but otherwise not. JNDI references and objects in your code don't "count" here.
I didn't ask about createTemporaryTopic() as a way of asking if you used temporary queues. I asked because if you are using createTemporaryTopic() then I can see why it would not be registering you as a publisher. I am guessing that the use of createTopic() in some way (rather than just setting the topic on the message, or when you publish) might cause the JMS stuff to register the publisher. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 08, 2007 2:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you look a little bit behind the scenes the "createTopic()" functionality is quite different whether you are publisher or subscriber.
When publisher you can go for the minimum..., no wild cards allowed...
However when subscriber this is where you want to specify any queue you want to receive the publications on (usually an alias conforming to JMS standard). You can also go for wildcards, to receive messages from multiple topics in the same topic tree etc...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|