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 » WebSphere Message Broker (ACE) Support » PUB/SUB Issues WBI V5

Post new topic  Reply to topic
 PUB/SUB Issues WBI V5 « View previous topic :: View next topic » 
Author Message
rsashi
PostPosted: Mon Dec 04, 2006 9:08 am    Post subject: PUB/SUB Issues WBI V5 Reply with quote

Apprentice

Joined: 29 Jan 2004
Posts: 35

[b]SUB[/b]
I was able to register a Topic using rfhutil.exe ,
Topic Name - > COMPANY/SALES/CPM
QUEUE - > COMPNAY.OUT ( Queue is under same QM as broker)
QM Name -> COMPNAY (QM is same as broker QM)
I am able to see all this details under subscrition tab.

[b] PUB[/b]

I have developed a flow with following nodes MQInput -> Compute -> Publication node.
In the Compute node i have below ESQL coded,
------------------------------------------------------------------------
CREATE COMPUTE MODULE TopicRegister_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
SET OutputRoot.MQMD.Format = 'MQRFH2';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.psc.Command = 'Publish';
SET OutputRoot.MQRFH2.psc.Topic = 'COMPANY/SALES/CPM';
SET OutputRoot.XML.CompanyFramework = InputRoot.XML.CompanyFramework;
RETURN true;
END;

END MODULE;
----------------------------------------------------------------------------
[b]Problem[/b] is when i run the flow with sample publication XML message i don't see any msg getting routed to subscription queue COMPNAY.OUT. Your help is much appreciated.
Thanks
Back to top
View user's profile Send private message
cadenza
PostPosted: Mon Dec 04, 2006 11:27 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2004
Posts: 48

Hi,

Quote:
SET OutputRoot.MQMD.Format = 'MQRFH2';


Kindly change it to

SET OutputRoot.MQMD.Format = 'MQHRF2';

Test it.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 04, 2006 12:16 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Kindly change it to MQFMT_RF_HEADER_2.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rsashi
PostPosted: Mon Dec 04, 2006 2:04 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Jan 2004
Posts: 35

I did change my code to SET OutputRoot.MQMD.Format = '[b]MQHRF2'[/b];
But still my publishing msg is not ending up in a subscribed queue.Below is the trace ,

'PublicationFlow.Trace': Evaluating expression 'Root' at (, 1.3).
2006-12-04 13:53:25.565050 7724 UserTrace BIP4067I: Message propagated to output terminal for trace node 'PublicationFlow.Trace'.
The trace node 'PublicationFlow.Trace' has received a message and is propagating it to any nodes connected to its output terminal.
No user action required.
2006-12-04 13:53:25.565401 7724 UserTrace BIP7080I: Node 'PublicationFlow.Publication.ComIbmPSService': The Publication Node with Subscription Point '' has received a message of type Publish.
The Publication Node with Subscription Point '' has started processing a message.
No user action required.
2006-12-04 13:53:25.565719 7724 UserTrace BIP7085I: Node 'PublicationFlow.Publication.ComIbmPSService': The Publication Node has propagated a message to its output terminal for subscription point ''.
The Publication Node has propagated the current message to its output terminal.
No user action required.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 04, 2006 2:17 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's not entirely MQHRF2. There are some spaces after it - MQHRF2bb or such, where "b" means " ".

That's why I suggested using the symbolic constant MQFMT_RF_HEADER_2 instead. You don't have to worry about what the correct literal value is.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rsashi
PostPosted: Mon Dec 04, 2006 2:32 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Jan 2004
Posts: 35

I did try with MQFMT_RF_HEADER_2 also, but same result.Publication msg not ending up in subscription queue,

Node 'PublicationFlow.Trace': Evaluating expression 'Root' at (, 1.3).
2006-12-04 14:31:35.206718 7724 UserTrace BIP4067I: Message propagated to output terminal for trace node 'PublicationFlow.Trace'.
The trace node 'PublicationFlow.Trace' has received a message and is propagating it to any nodes connected to its output terminal.
No user action required.
2006-12-04 14:31:35.207065 7724 UserTrace BIP7080I: Node 'PublicationFlow.Publication.ComIbmPSService': The Publication Node with Subscription Point '' has received a message of type Publish.
The Publication Node with Subscription Point '' has started processing a message.
No user action required.
2006-12-04 14:31:35.207378 7724 UserTrace BIP7085I: Node 'PublicationFlow.Publication.ComIbmPSService': The Publication Node has propagated a message to its output terminal for subscription point ''.
The Publication Node has propagated the current message to its output terminal.
No user action required.
Back to top
View user's profile Send private message
rsashi
PostPosted: Mon Dec 04, 2006 2:36 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Jan 2004
Posts: 35

Below is what i see in my Trace node,

(0x01000000):Properties = (
(0x03000000):MessageSet = NULL
(0x03000000):MessageType = NULL
(0x03000000):MessageFormat = NULL
(0x03000000):Encoding = NULL
(0x03000000):CodedCharSetId = NULL
(0x03000000):Transactional = UNKNOWN
(0x03000000):Persistence = UNKNOWN
(0x03000000):CreationTime = NULL
(0x03000000):ExpirationTime = NULL
(0x03000000):Priority = NULL
(0x03000000):ReplyIdentifier = NULL
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = 'MyTopic'
)
(0x01000000):MQMD = (
(0x03000000):Format = 'MQHRF2 '
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):NameValueCCSID = 1208
(0x01000000):psc = (
(0x01000000):Command = (
(0x02000000): = 'Publish'
)
(0x01000000):Topic = (
(0x02000000): = 'MyTopic'
)
)
(0x01000000):mcd = (
(0x01000000):Msd = (
(0x02000000): = 'xml'
)
)
)
(0x01000010):XML = (
(0x01000000):A = (
(0x02000000): = 'Testing Publication'
)
)
)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 04, 2006 2:46 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You registered for topic 'COMPANY/SALES/CPM' and published on topic "MyTopic"?

Register another subscription to another queue for the wildcard topic - to get all subscription messages.

See if something shows up there.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rsashi
PostPosted: Mon Dec 04, 2006 3:00 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Jan 2004
Posts: 35

Corrected the Topic name and it works now.Thanks a lot for your help. But when i look at the message inside the subscription queue i see RFH data too and the msg format shows as MQHRF2. My question is how to remove the RFH data when it gets in subscription queue.Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 04, 2006 3:36 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It didn't used to be possible.

I think it's possible these days by not building an MQRFH2, and specifying a default Topic on the publication node.

That is to say, it's not possible to publish on a dynamic topic and not include an MQRFH2.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rsashi
PostPosted: Mon Dec 04, 2006 3:51 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Jan 2004
Posts: 35

I have to generate Topic dynamically while publishing...so is there a way how to remove RFH header before broker drops a msg into subsciption queue.
Thanks.
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Mon Dec 04, 2006 8:20 pm    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

I dont think the Publishing flow will strip the rfh header as topic wud be in there, as one of work around approach could be,

subscribe to a dummy queue, and using a message flow strip off the rfh header and drop it in the Target Queue.
Back to top
View user's profile Send private message
vk
PostPosted: Mon Dec 04, 2006 9:03 pm    Post subject: Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

Topic need not be specified always in the psc folder of RFH header. It can also be set in the properties tree before passing it on to the Publication node.

SET OutputRoot.Properties.Topic = 'ABC';

Publication node will use this to identify the topic and send the message to all queues subscribed for that topic. This will enable specifying the topic name dynamically and at the same time avoid the RFH header from being sent to the subscription queue.

Regards,
VK.
Back to top
View user's profile Send private message
rsashi
PostPosted: Thu Dec 07, 2006 1:43 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Jan 2004
Posts: 35

How to handle exception's like, if the destination queue(subscription queue) not defined.I know the msg will end up in a dead letter queue, but my question is how to roll back the msg to a ERROR queue and try again by sub flow.
Thanks.
Back to top
View user's profile Send private message
vk
PostPosted: Thu Dec 07, 2006 5:50 pm    Post subject: Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

As far as I know, since the Publication node does not have a failure terminal, there is no failure processing coded for the node. So once we give a message to the Publication node, we do not have a control on what happens after that.

Some days back, I was also looking for ways to prevent the messages from going to dead letter queue due to queue not found issues, but could not find or think of any. We have had many cases in Production where due to cluster issues in MQ, a queue becomes unavailable and so messages end up in the dead letter queue. The messages can be resent once the issue is resolved, but still the sequence will be lost.

If anyone has a solution to this, I would also be interested to know.

Regards,
VK.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PUB/SUB Issues WBI V5
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.