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 » General IBM MQ Support » def sub with selector

Post new topic  Reply to topic
 def sub with selector « View previous topic :: View next topic » 
Author Message
scravr
PostPosted: Thu Jul 29, 2010 7:18 am    Post subject: def sub with selector Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

on MQExplorer V7 I been able to def sub with selector like: MsgType=xyzabc

when runing mqsc i am getting AMQ8427 syntax error

DEFINE SUB(SB1) TOPICOBJ(TP1) DEST(MyQ) DESTCLAS(PROVIDED) REQONLY(NO) SELECTOR(MsgType=xyzabc)

this also error:
DEFINE SUB(SB1) TOPICOBJ(TP1) DEST(MyQ) DESTCLAS(PROVIDED) REQONLY(NO) SELECTOR('MsgType=xyzabc')


any ideas?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Thu Jul 29, 2010 7:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What's the error?
Back to top
View user's profile Send private message
scravr
PostPosted: Thu Jul 29, 2010 8:00 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

AMQ8405: Syntax error detected at or near end of command segment below:-

DEFINE SUB(SB1) TOPICOBJ(TP1) DEST(MyQ) DESTCLAS(PROVIDED) REQONLY(NO) SELECTOR(MsgType=

AMQ8427: Valid syntax for the MQSC command:


DEFINE SUB( subscription_name )
TOPICSTR( string )
| TOPICOBJ( obj_name ) [ DEST( obj_name ) ]
[ DESTQMGR( generic_Q_Mgr_name ) ] [ DESTCORL( string ) ]
[ EXPIRY( UNLIMITED | integer ) ]
[ PUBPRTY( ASPUB | ASQDEF | integer ) ]
[ PUBACCT( string ) ] [ PUBAPPID( string ) ]
[ SELECTOR( string ) ] [ USERDATA( string ) ]
[ DESTCLAS( MANAGED | PROVIDED ) ]
[ PSPROP( NONE | COMPAT | RFH2 | MSGPROP ) ]
[ REQONLY( YES | NO ) ] [ SUBLEVEL( integer ) ]
[ SUBUSER( string ) ] [ SUBSCOPE( ALL | QMGR ) ]
[ VARUSER( ANY | FIXED ) ] [ WSCHEMA( CHAR | TOPIC ) ]
[ LIKE( subscription_name ) ] [ REPLACE | NOREPLACE ]

Looks like the selector string is nor accepted.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
scravr
PostPosted: Thu Jul 29, 2010 8:06 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

where can i find a complete syntax description for MQ V7 sub selector?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Thu Jul 29, 2010 8:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

apply 7.0.1.2. it works for me here.

If it still doesn't work, open a PMR.
Back to top
View user's profile Send private message
pdmenon
PostPosted: Thu Jul 29, 2010 10:51 pm    Post subject: Reply with quote

Voyager

Joined: 05 Apr 2010
Posts: 80

Same error pops out for the MQVersion : 7.0.0.0
Back to top
View user's profile Send private message
scravr
PostPosted: Fri Jul 30, 2010 4:39 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

With MQ 7.0.1.0 :
I defined a topic and a simple subscriber with selection as Topic="MyTopic"
The run a publisher flow with a Publication. It runs fin and finds the subscriber.

Then successfuly changed subscriber selection to (with mqsc)
DEFINE SUB(SB1) TOPICOBJ(TP1) DEST(MyQ) DESTCLAS(PROVIDED) REQONLY(NO) SELECTOR ('MsgType="T1" and Topic="/Topic1"')

When run the same publisher, the Publication node crashes. In debug mode, the flow stops at the Publication node !

Also with MQExplorer, right click on topic and choose "Test Publication..." put some test on "Message data:" ... I am getting AMQ4482 with reason code 2251.

Looks like the underline java/c++ code that matches the topic to selection fails with some null pointer.


Can someone test the same with 7.0.1.2 ?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
scravr
PostPosted: Fri Jul 30, 2010 8:08 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

how can i specify the "selector type" on mqsc def sub?
it looks like it forces "extended" instead of "standard" !!!
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mvic
PostPosted: Sat Jul 31, 2010 1:47 pm    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

scravr wrote:
Can someone test the same with 7.0.1.2 ?

Perhaps you?

7.0.1.0 was a refresh pack, containing some significant updates. 7.0.1.2 is more stable.
Back to top
View user's profile Send private message
scravr
PostPosted: Sat Jul 31, 2010 5:26 pm    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

7.0.1.2 has same error.
mqsc forces "extended" which cause the error.
MQExplorer forces "standard" which works fine.

We need to ask IBM to give options on the SELTYPE.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Sun Aug 01, 2010 1:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

scravr wrote:
7.0.1.2 has same error.
mqsc forces "extended" which cause the error.
MQExplorer forces "standard" which works fine.

We need to ask IBM to give options on the SELTYPE.


Right, so as you have noticed, SELTYPE is not a user-alterable property.

SELTYPE is new as of 7.0.1.x, in order to allow for Message Broker v7 to use MQ pub/Sub and still provide the same advanced pub/sub filtering based on the contents of the message that it had provided previously.

The difference between SELTYPE(STANDARD) and SELTYPE(EXTENDED) is based on the contents of the SELECTOR. If you keep getting an automatically determined SELTYPE(EXTENDED), then you can try two things a) changing the SELECTOR string until it stops using Extended selector syntax, b) define it on a queue manager that does not have a Message Broker instance assigned to it.
Back to top
View user's profile Send private message
scravr
PostPosted: Mon Aug 02, 2010 4:43 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

"b) define it on a queue manager that does not have a Message Broker
instance assigned to it."
Do you suggest creating a QM just for complex SELECTORs ???


"a) changing the SELECTOR string until it stops using Extended selector syntax, "

Is there any manual describing SELECTORs syntax ?


My suggestion: having SELTYPE configurable !
Back to top
View user's profile Send private message Send e-mail MSN Messenger
mqjeff
PostPosted: Mon Aug 02, 2010 11:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

scravr wrote:
"b) define it on a queue manager that does not have a Message Broker
instance assigned to it."
Do you suggest creating a QM just for complex SELECTORs ???

No, I'm suggesting that it's possible that EVERY Sub defined on a queue manager that has Message Broker running on it (at least Message broker v7) will automatically have SELTYPE(Extended).

As for making SELTYPE configurable, the difficulty here is what it is being used for. It's being used to indicate information about a specific selector string. It wouldn't be much use if you could create a Selector string that was too complex to process using standard MQ Pub/Sub, and instruct MQ that it had to be processed using standard MQ Pub/Sub!

As for documentation on the syntax of SELECTOR, yes this should be in the MQ pub/sub manual or in the broker pub/sub descriptions. As a reminder, anything involving anything that is not strictly in the TOPIC string is very likely to need to be an EXTENDED selector.
Back to top
View user's profile Send private message
blee
PostPosted: Sun Nov 14, 2010 12:06 pm    Post subject: Reply with quote

Newbie

Joined: 28 Feb 2006
Posts: 7

Hi there:

Did you guys come out with the solution to resolve the SELTYPE problem (i.e. the "MQPUT ended with reason code 2551" that is caused by the SELTYPE(EXTENDED))?

I tried the "Content-based filtering message flow example provided in the IBM Redbook: "Connetcting Your Business Using WebSphere Message Broker V7 as an ESB" (on page 402) and it did not work properly because the 2551 error was preventing the message broker from delivering the message correctly.

I checked the subscription created in that example (as shown below) and the SELTYPE was set to Extended:

SUB(BROKER7 OUT 414D51580000000000000000000000000000000000000000 Weather Root.XMLNSC.Forecast.Temperature > 30)

TOPICSTR(Weather)
TOPICOBJ(SYSTEM.BROKER.DEFAULT.SUBPOINT)
DEST(OUT) DESTQMGR(BROKER7)
PUBAPPID( )
SELECTOR(Root.XMLNSC.Forecast.Temperature > 30)
SELTYPE(EXTENDED) USERDATA( )
PUBACCT(0000000000000000000000000000000000000000000000000000000000000000)
DESTCORL(414D51580000000000000000000000000000000000000000)
DESTCLAS(PROVIDED) DURABLE(YES)
EXPIRY(UNLIMITED) PSPROP(RFH2)
PUBPRTY(ASPUB) REQONLY(NO)
SUBSCOPE(ALL) SUBLEVEL(1)
SUBTYPE(API) VARUSER(FIXED)
WSCHEMA(TOPIC) SUBUSER(BKL)
CRDATE(2010-11-14) CRTIME(14:53:27)
ALTDATE(2010-11-14) ALTTIME(14:53:27)


I tried all the possible combination (i.e. changing the SELECTOR string, etc) but no luck, the SELTYPE remained as EXTENDED and that caused MQ to complain about 2551 error.

Hopefully one of you have discover a solution and please do share with me. Thanks.
Back to top
View user's profile Send private message
blee
PostPosted: Sun Nov 14, 2010 3:16 pm    Post subject: Reply with quote

Newbie

Joined: 28 Feb 2006
Posts: 7

Hi All:

Found the solution.

Turn out that the package included in the IBM Redbook (V7_flows.zip) missed the following line of ESQL code in the V7_publish.esql:


SET OutputRoot.XMLNSC = InputRoot.XMLNSC ;


After adding the code (which basically adding the body back to the message), the pub/sub using content based filtering worked in WMB v7 using the MQ v7 pub/sub engine. Note that error 2551 will persist since MQ does not handle the content based filtering but WMB does.

Hope this help.
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 » General IBM MQ Support » def sub with selector
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.