Subscriber

  1. Configure the subscriber to query the published Auction topic on direct queries for GetInventoryItems and GetCurrentBids.
  1. Open the file.

Configure the subscriber to query the published Auction topic

  1. Modify the GENERIC_TOPIC_NAME from One to Auction.
  1. Modify the GENERIC_QUERY_NAME_SET to reflect GetInventoryItems,GetCurrentBids,BidOnItems.

  1. Run the generic client script for the pxgrid client subscriber sdk01-sub.

Note: The topic name is Auction, the clientMODE is set for SUBSCRIBER. Also notice that the pxGrid client can subscribe to the GetInventoryItems, GetCurrentBid, and BidOnItems query items. During the message exchanges with the publisher you will see the Auction capability and the GetInventoy, GetCurrentBids, BidonItems that the pxGrid client has subscribed to. The subscriber will not be authorized to bidonitems.

./generic_client.sh -a 10.10.20.11 -u sdk01-sub -k alpha.jks -p cisco123 -t alpha_root.jks -q cisco123 -c generic_subscriber.properties

generic_client.sh

Initialized : GenericClient:

topicName=Auction

clientMode=SUBSCRIBER

sleepInterval=500

iterations=20

queryNameSet=[GetInventoryItems, GetCurrentBids, BidOnItems]

actionNameSet=[]

publishDataSet=[]

requestDataSet=[req-001, req-002, req-003]

responseDataSet=[]

------- properties -------

version=1.0.2.37

hostnames=10.10.20.11

username=sdk01-sub

group=Auction_Subscribe

description=null

keystoreFilename=alpha.jks

keystorePassword=cisco123

truststoreFilename=alpha_root.jks

truststorePassword=cisco123

--------------------------

03:55:11.582 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started

Connecting...

Connected

03:55:14.909 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404115137]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404115205]resp-001 - for request[QUERY[1464404115137]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404115715]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404115751]resp-002 - for request[QUERY[1464404115715]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404116272]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404116813]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404116850]resp-003 - for request[QUERY[1464404116813]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404117354]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404117387]resp-004 - for request[QUERY[1464404117354]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404117892]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404118432]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404118468]resp-001 - for request[QUERY[1464404118432]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404118976]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404119014]resp-002 - for request[QUERY[1464404118976]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404119519]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404120064\]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404120093]resp-003 - for request[QUERY[1464404120064]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404120603]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404120642]resp-004 - for request[QUERY[1464404120603]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404121146]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404121691]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404121741]resp-001 - for request[QUERY[1464404121691]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404122245]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404122298]resp-002 - for request[QUERY[1464404122245]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404122813]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404123353]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404123393]resp-003 - for request[QUERY[1464404123353]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404123899]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404123933]resp-004 - for request[QUERY[1464404123899]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404124436]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404124975]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404125008]resp-001 - for request[QUERY[1464404124975]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404125513]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404125544]resp-002 - for request[QUERY[1464404125513]req-002]

Press <enter> to disconnect...