MyChannels.Nirvana.ITopicSession Interface Reference

Defines Topic operations available in a session. More...

Inherited by MyChannels.Nirvana.InternalSession.

Public Member Functions

IBatch CreateBatch (string[] topics)
 Creates a batch of Topic operations (passing null or empty array requires use of IBatch.Send(string resource, IMessage message)) More...
 
IConsumer CreateConsumer (string name, string filter=null, long eventId=0, bool subscribeToPurge=false)
 Creates a Topic consumer. More...
 
IConsumer CreateNamedConsumer (string name, string unique, string filter=null, bool priorityEnabled=false, bool subscribeToPurge=false)
 Creates a Topic consumer for a channel that uses "named objects". More...
 
IProducer CreateProducer (string name)
 Creates a Topic producer More...
 
IEnumerable< IProducerCreateProducers (IEnumerable< string > names)
 Creates many Topic producers More...
 
IRegisteredEvent CreateRegisteredEvent (string topicName, string uniqueId, bool isTransactional=false)
 Create a registered event for the specified topic More...
 
IBatchedSubscription CreateSubscriptionBatch ()
 Create many consumers More...
 
ITransactionalConsumer CreateTransactionalConsumer (string name, string unique, string filter=null, bool priorityEnabled=false, bool subscribeToPurge=false)
 Creates a transactional Topic consumer More...
 

Detailed Description

Defines Topic operations available in a session.

Member Function Documentation

IBatch MyChannels.Nirvana.ITopicSession.CreateBatch ( string[]  topics)

Creates a batch of Topic operations (passing null or empty array requires use of IBatch.Send(string resource, IMessage message))

///

Parameters
topicsarray of topic names to send to
Returns
An IBatch instance
IConsumer MyChannels.Nirvana.ITopicSession.CreateConsumer ( string  name,
string  filter = null,
long  eventId = 0,
bool  subscribeToPurge = false 
)

Creates a Topic consumer.

Parameters
nameThe name of the topic
filterThe event filter (channel key)
eventIdThe event id you would like to start at.
subscribeToPurgeThe consumer will receive purge events
IConsumer MyChannels.Nirvana.ITopicSession.CreateNamedConsumer ( string  name,
string  unique,
string  filter = null,
bool  priorityEnabled = false,
bool  subscribeToPurge = false 
)

Creates a Topic consumer for a channel that uses "named objects".

Parameters
nameThe name of the topic
uniqueThe named object
filterThe event filter (channel key)
priorityEnabledEnable priority listener
subscribeToPurgeThe consumer will receive purge events
IProducer MyChannels.Nirvana.ITopicSession.CreateProducer ( string  name)

Creates a Topic producer

Parameters
nameThe name of the topic
IEnumerable<IProducer> MyChannels.Nirvana.ITopicSession.CreateProducers ( IEnumerable< string >  names)

Creates many Topic producers

Parameters
namesThe names of the topics
IRegisteredEvent MyChannels.Nirvana.ITopicSession.CreateRegisteredEvent ( string  topicName,
string  uniqueId,
bool  isTransactional = false 
)

Create a registered event for the specified topic

Parameters
topicNameThe name of the topic
uniqueIdThe registered event's unique ID
isTransactionalUse transactional commits
Returns
The registered event
IBatchedSubscription MyChannels.Nirvana.ITopicSession.CreateSubscriptionBatch ( )

Create many consumers

Returns
A batch object that can be used to efficiently subscribe to many topics
ITransactionalConsumer MyChannels.Nirvana.ITopicSession.CreateTransactionalConsumer ( string  name,
string  unique,
string  filter = null,
bool  priorityEnabled = false,
bool  subscribeToPurge = false 
)

Creates a transactional Topic consumer

Parameters
nameThe name of the topic
uniqueThe named object
filterThe event filter (channel key)
priorityEnabledEnable priority listener
subscribeToPurgeThe consumer will receive purge events