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 » How to implement filter condition in Public subscribe.......

Post new topic  Reply to topic
 How to implement filter condition in Public subscribe....... « View previous topic :: View next topic » 
Author Message
satayoday
PostPosted: Tue Jun 30, 2009 10:51 pm    Post subject: How to implement filter condition in Public subscribe....... Reply with quote

Novice

Joined: 27 May 2007
Posts: 22

Hi All,
I am trying to mplement filtering condition in public subscribe.Can any one please guide me how to achive the target.

I tried with below mentioned option but did not worked.
In Subscriber messge flow
SET OutputRoot.MQRFH2.psc.Filter= 'user';

In publisher flow
SET OutputRoot.MQRFH2.psc.Filter= 'user';

but it is not working.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Jun 30, 2009 11:21 pm    Post subject: Re: How to implement filter condition in Public subscribe... Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

satayoday wrote:
but it is not working.


In what way? No messages published? No messages picked up by the subscriber? The wrong messages picked up by the subscriber? Error messages? Core dumps? Loud explosions?

Using what version of WMB? Running on what WMQ? On what platform?

Just saying "it's not working please help" is going to get the response "it's broken some how, need to fix it". Better information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
satayoday
PostPosted: Tue Jun 30, 2009 11:32 pm    Post subject: In what way? No messages published? N Reply with quote

Novice

Joined: 27 May 2007
Posts: 22

Subscriber flow:-

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='RegSub';
SET OutputRoot.MQRFH2.psc.Topic=InputRoot.XML.topic;
SET OutputRoot.MQRFH2.psc.QMgrName ='WBRK6_DEFAULT_QUEUE_MANAGER';
SET OutputRoot.MQRFH2.psc.QName= 'PublishQueue';
SET OutputRoot.MQRFH2.psc.Filter= '(Body.Publish.data) >= 100';

Publisher Flow

SET OutputRoot.MQMD.ReplyToQ = 'RTOQ';
SET OutputRoot.MQMD.Format= MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.psc.Topic=InputRoot.XML.Publish.topic;
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."BLOB"."BLOB"=BITSTREAM(InputRoot.XML.Publish.data);
SET OutputRoot.MQRFH2.psc.Filter= InputRoot.XML.Publish.data;
SET OutputRoot.MQRFH2.mcd = NULL ;


Subscriber message:-
<topic>fruits</topic>
Publish me<Publish><topic>fruits</topic><data>150</data></Publish>ssage:-
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Jun 30, 2009 11:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Aside from the many dubious aspects of your code (some quite frightening) what exactly is the problem? I'm guessing we've ruled out loud explosions, but what happens (or doesn't happen) when you execute this monster?

(And executing it, with an axe, is not a bad idea!)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
satayoday
PostPosted: Tue Jun 30, 2009 11:53 pm    Post subject: what exactly is the problem? Reply with quote

Novice

Joined: 27 May 2007
Posts: 22

I am able to run this flow by registering without filter condition only with topic.But when i applied filter condition it is not working.

Any idea wherei will get the error i debugged the flow it is passing till publication node after that nothing happining.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Jun 30, 2009 11:58 pm    Post subject: Re: what exactly is the problem? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

satayoday wrote:
But when i applied filter condition it is not working.


Vitor wrote:
In what way? No messages published? No messages picked up by the subscriber? The wrong messages picked up by the subscriber? Error messages?




satayoday wrote:
Any idea wherei will get the error


I'm not even going to comment on your code.

satayoday wrote:
i debugged the flow it is passing till publication node after that nothing happining.


As is the much repeated advice in this forum, take a user trace rather than use the debugger. You get far more information.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 01, 2009 12:23 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

So I see you have a replyto destination in the MQMD.
What is the pscr message you receive there upon publish?

Quote:
SET OutputRoot."BLOB"."BLOB"=BITSTREAM(InputRoot.XML.Publish.data);
SET OutputRoot.MQRFH2.psc.Filter= InputRoot.XML.Publish.data;
I sure hope that there is an error here somewhere. As said previously the user trace will tell you much more...

Aside from the fact that the XML domain is deprecated, why would the payload reference be the filter and not the BLOB of the payload reference?
Looking at the fact that the subscriber filter seems to reference specific fields in the message Body we have a few counter-productive lines of code in the publisher:
Why reference anything in the filter on the publish operation? Do not even create the folder... And by the way I did not verify the doc but you better, and make sure the filter folder and syntax you used is the right way to go for the subscriber, and publisher!!! Wouldn't using a BLOB on OutputRoot be counter-productive as to the filtering capability which does expect some kind of a tree to be available?

And what about subscription point? I seem to remember that filtering was done through subscription points? But then that is just me... and I have never used filtering or subscription points in pub/sub.

Maybe a passing IBMer can help clear up this mess.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to implement filter condition in Public subscribe.......
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.