class: ActiveMqProducer
[24:14] (extern: com.lehman.aussom.ActiveMqProducer) extends: object
Sends messages to a destination. Created with ActiveMqSession.createProducer(). Producers bound to a destination use send(); anonymous producers (created with null) use sendTo().
Methods
-
setDeliveryMode (
string Mode)Sets the default delivery mode for sends.
- @p
Modeis a string with persistent or non_persistent. - @r
thisobject
- @p
-
setPriority (
int P)Sets the default priority for sends.
- @p
Pis an int from 0 to 9 (the JMS default is 4). - @r
thisobject
- @p
-
setTimeToLive (
int Ms)Sets the default time-to-live for sends.
- @p
Msis an int with milliseconds, 0 for never expire. - @r
thisobject
- @p
-
setDisableMessageId (
bool On)Skips message ID generation for a small performance gain.
- @p
Onis a bool with true to skip IDs. - @r
thisobject
- @p
-
setDisableMessageTimestamp (
bool On)Skips timestamp generation for a small performance gain.
- @p
Onis a bool with true to skip timestamps. - @r
thisobject
- @p
-
send (
object Msg, DeliveryMode = null, Priority = null, TtlMs = null)Sends a message to this producer's destination. The optional arguments override the producer defaults for this send only.
- @p
Msgis an ActiveMqMessage object. - @p
DeliveryModeis a string with persistent or non_persistent (optional). - @p
Priorityis an int from 0 to 9 (optional). - @p
TtlMsis an int with the time-to-live in milliseconds (optional). - @r
thisobject
- @p
-
sendTo (
object Dest, object Msg)Sends a message to an explicit destination from an anonymous producer. This is how request/reply consumers answer to a message's replyTo.
- @p
Destis an ActiveMqDestination object. - @p
Msgis an ActiveMqMessage object. - @r
thisobject
- @p
-
close ()
Closes the producer. Safe to call more than once.
- @r
thisobject
- @r