Assembly: TIBCO.EMS (in TIBCO.EMS.dll)
Syntax
public static void SetNPSendCheckMode( MessageProducer producer, int mode ) |
Public Shared Sub SetNPSendCheckMode ( _ producer As MessageProducer, _ mode As Integer _ ) |
public: static void SetNPSendCheckMode( MessageProducer^ producer, int mode ) |
Parameters
- producer
- Type: TIBCO.EMS..::.MessageProducer
message producer, must not be null
- mode
- Type: System..::.Int32
one of constants {NPSEND_CHECK_DEFAULT}, {NPSEND_CHECK_ALWAYS}, {NPSEND_CHECK_NEVER}, {NPSEND_CHECK_TEMP_DEST}, {NPSEND_CHECK_AUTH} or {NPSEND_CHECK_TEMP_AUTH}
Remarks
This mode only applies to messages sent using the MesssageDeliveryMode.NonPersistent delivery mode and a non-transactional Session; it does not apply to cases when a message was sent using MessageDeliveryMode.Persistent or the {ReliableDelivery} delivery mode or if the corresponding Session is transactional. If the producer's send check mode is not set, it may execute the mode applied globally to all producers via the EMS server parameter. Setting any mode other than {NPSEND_CHECK_DEFAULT} unconditionally overrides the global setting defined by the server.
Normally, applications use the server's setting or configure producers with a specific send mode only once. However, if required, applications may choose to change this mode before sending every message.
When a producer does not check the result of sending a message, it will not know if any problem has occurred and the message was not processed by the server. If a producer checks the result of the send, the Send method will receive the server's response to the send and throw the appropriate exception if any problem has occurred. However, this will reduce the producer's performance.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentException | if the producer is null or if the mode value is invalid. |