Home    
 
Products Solutions Developers Nirvana Nirvana documentation Nirvana examples Nirvana FAQ Nirvana Archive Matrix Partners Download Company Contact
 
 

Durable subscribing with a named subscriber in Nirvana

home > developers > 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. The class extends nSampleApp.java.

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.

 

 

 

 

 
 

 

Printer friendly version  
   
© 2001-2008 my-channels.com. (Terms of Use)