Author |
Message
|
rikardo.miguel |
Posted: Wed Oct 31, 2018 2:42 pm Post subject: Publish to a remote queue manager |
|
|
Newbie
Joined: 31 Oct 2018 Posts: 4
|
Hi,
How can i publish to a remote queue manager on IIB without jms?
If i use a queue alias the message is going allways to the root of topic because i cannot select the topic string.
Any idea?
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 31, 2018 8:26 pm Post subject: Re: Publish to a remote queue manager |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
rikardo.miguel wrote: |
Hi,
How can i publish to a remote queue manager on IIB without jms?
If i use a queue alias the message is going allways to the root of topic because i cannot select the topic string.
Any idea?
Thanks |
No but you can create a topic object with the corresponding topic string and reference that topic object in the alias queue.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rikardo.miguel |
Posted: Thu Nov 01, 2018 10:02 am Post subject: Re: Publish to a remote queue manager |
|
|
Newbie
Joined: 31 Oct 2018 Posts: 4
|
fjb_saper wrote: |
No but you can create a topic object with the corresponding topic string and reference that topic object in the alias queue.  |
But if i configure the alias queue to send the messages to the topic what will happen is that the messages will arrive to the root of topic because the queue alias will make a PUT instead of a PUB.
I'm wrong? If so, how can i configure the queue alias to put the message into a specific topic string?
If i have this topic:
define TOPIC(DEPSUB1) TOPICSTR('DEPARTMENT/A/SUBJECT1')
Should i configure the queue alias with the topic name + topic string? Or just with topic string? like:
DEFINE QALIAS (MY.ALIAS.QUEUE) TARGET (DEPARTMENT/A/SUBJECT1)
Thanks for your help. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 01, 2018 3:21 pm Post subject: Re: Publish to a remote queue manager |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
rikardo.miguel wrote: |
fjb_saper wrote: |
No but you can create a topic object with the corresponding topic string and reference that topic object in the alias queue.  |
But if i configure the alias queue to send the messages to the topic what will happen is that the messages will arrive to the root of topic because the queue alias will make a PUT instead of a PUB.
I'm wrong? If so, how can i configure the queue alias to put the message into a specific topic string?
If i have this topic:
define TOPIC(DEPSUB1) TOPICSTR('DEPARTMENT/A/SUBJECT1')
Should i configure the queue alias with the topic name + topic string? Or just with topic string? like:
DEFINE QALIAS (MY.ALIAS.QUEUE) TARGET (DEPARTMENT/A/SUBJECT1)
Thanks for your help. |
The target cannot be a topic string. it has to be a topic object. in your example DEPSUB1.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rikardo.miguel |
Posted: Thu Nov 01, 2018 3:59 pm Post subject: Re: Publish to a remote queue manager |
|
|
Newbie
Joined: 31 Oct 2018 Posts: 4
|
fjb_saper wrote: |
rikardo.miguel wrote: |
fjb_saper wrote: |
No but you can create a topic object with the corresponding topic string and reference that topic object in the alias queue.  |
But if i configure the alias queue to send the messages to the topic what will happen is that the messages will arrive to the root of topic because the queue alias will make a PUT instead of a PUB.
I'm wrong? If so, how can i configure the queue alias to put the message into a specific topic string?
If i have this topic:
define TOPIC(DEPSUB1) TOPICSTR('DEPARTMENT/A/SUBJECT1')
Should i configure the queue alias with the topic name + topic string? Or just with topic string? like:
DEFINE QALIAS (MY.ALIAS.QUEUE) TARGET (DEPARTMENT/A/SUBJECT1)
Thanks for your help. |
The target cannot be a topic string. it has to be a topic object. in your example DEPSUB1.  |
Sure, so how can i specify the topic string if i can only set the target to the topic object?
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 02, 2018 3:40 am Post subject: Re: Publish to a remote queue manager |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
rikardo.miguel wrote: |
Sure, so how can i specify the topic string if i can only set the target to the topic object?
Thanks |
Duh the topic string published to will be the one you defined on the topic object...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
hughson |
Posted: Sat Nov 03, 2018 9:15 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
You have a topic defined like this:-
Code: |
DEFINE TOPIC(DEPSUB1) TOPICSTR('DEPARTMENT/A/SUBJECT1') |
and you want to access it using an alias queue, so you create an alias queue like this:-
Code: |
DEFINE QALIAS(MY.ALIAS.QUEUE) TARGTYPE(TOPIC) TARGET(DEPSUB1) |
Please note the important TARGTYPE(TOPIC) attribute on this alias queue definition.
Now if an application does an MQPUT to the alias queue MY.ALIAS.QUEUE, it will result in a publish to the topic string 'DEPARTMENT/A/SUBJECT1'
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|