Posted: Fri Sep 03, 2010 12:57 am Post subject: publication node all message to dead letter
Voyager
Joined: 20 Nov 2001 Posts: 98 Location: Hong Kong
problem in pub/sub
from the redbook Sg247826. just follow the steps to implement
the pub/sub solution. two flow created, pub and sub, the sample
look easy and well define. yet all the message reach to publication
node will all put to dead letter queue.
pub flow
mqinput -> compute > publication
queue in : PUB_IN
compute :
Example 9-3 ESQL V61_publish.esql
CREATE COMPUTE MODULE V61_publish_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
--Set up the Publication
SET OutputRoot.MQRFH2.psc.Command = 'Publish';
SET OutputRoot.MQRFH2.psc.PubOpt = 'Local';
SET OutputRoot.MQRFH2.psc.Topic = InputRoot.XMLNSC.Request.Topic;
SET OutputRoot.XMLNSC.Text = InputRoot.XMLNSC.Request.Text;
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
publication: nothing
--------------------------------------
sub flow :
queue: SUB_IN
compute:
Example 9-11 ESQL code
CREATE COMPUTE MODULE V7_subscribe_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
-- Set up the subscription request
SET OutputRoot.MQRFH2.psc.Command = 'RegSub';
SET OutputRoot.MQRFH2.psc.Topic = 'Weather';
SET OutputRoot.MQRFH2.psc.QMgrName = 'V7QM';
SET OutputRoot.MQRFH2.psc.Filter = 'Root.XMLNSC.Forecast.Temperature
> 30';
SET OutputRoot.MQRFH2.psc.QName = 'OUT';
RETURN TRUE;
do I need to tell the publication node the subscribe queue is SUB_in
also try running a trace on the flow it may show the reason
I notice you have SUB.IN and SUB.in in your post is this correct or just a typo? _________________ Who is General Failure and why is he reading my hard drive?
Artificial Intelligence stands no chance against Natural Stupidity.
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