This is archived documentation for an older version of Nirvana (v2.0). Please refer to documentation for the latest version if required.

Subscribing as a named subscriber to Nirvana

 

This example (namedsubscriber.Java) subscribes to a Nirvana server as a named subscriber. The Nirvana server will automatically track EIDs for that particular subscriber.

Java -DRNAME=someRNAME -DSTART=eid -DDEBUG=num -DCOUNT=num -DSELECTOR=evtSelector -DCHANNAME=channelname -DNAME=subscribername -DAUTO=true/false com.pcbsys.Nirvana.apps.subscriber where :
RNAME is the realm name of the Nirvana server you wish to connect to (e.g. nsp://localhost:9000 ).
CHANNAME is the name of the channel to subscribe to
NAME Specifies the unique name to be used for a named subscription
START is the event id (eid) to start subscribing from. This will default to subscribing from the latest eid.
DEBUG is how verbose the output should be. 0 = none; 1 = summary, 2 = EIDs only , 3 - eids and data
COUNT is the number of events to wait for before printin out summary information
SELECTOR is the event filter string to use. The default is no filter. Read about Nirvana filtering.
AUTO is whether to auto acknowledge or not. Defaults to true which means that the subscriber will automatically acknowledge the event when it leaves the go routine. If false is specified then events must be acknowledged from inside the go routine.