JmsProducer

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def make[R, E >: JMSException, A](destination: DestinationFactory, encoder: (A, Session) => ZIO[R, E, Message], transacted: Boolean, acknowledgementMode: Int): ZManaged[R & BlockingConnection, JMSException, JmsProducer[R, E, A]]
def requestSink[R, E >: JMSException, A](destination: DestinationFactory, replyTo: DestinationFactory, encoder: (A, Session) => ZIO[R, E, Message], transacted: Boolean, acknowledgementMode: Int): ZSink[R & BlockingConnection, E, A, A, Unit]

Creates a sink for implementing Request - Reply integration pattern. It sends messages to the specified destination and enriches JMSReplyTo header with provided response destination. You need to specify JMSCorrelationID manually if required by provided encoder.

Creates a sink for implementing Request - Reply integration pattern. It sends messages to the specified destination and enriches JMSReplyTo header with provided response destination. You need to specify JMSCorrelationID manually if required by provided encoder.

Type Params
A

message type

E

specifies possible errors

R

specifies dependencies

Value Params
acknowledgementMode

specifies session acknowledgement mode

destination

specifies destination

encoder

converts a message to an appropriate JMS message

replyTo

specifies response destination

transacted

specifies session transactionality

Returns

a new sink

def routerSink[R, E >: JMSException, A](encoderAndRouter: (A, Session) => ZIO[R, E, (Destination, Message)], transacted: Boolean, acknowledgementMode: Int): ZSink[R & BlockingConnection, E, A, A, Unit]
def sink[R, E >: JMSException, A](destination: DestinationFactory, encoder: (A, Session) => ZIO[R, E, Message], transacted: Boolean, acknowledgementMode: Int): ZSink[R & BlockingConnection, E, A, A, Unit]

Creates a sink for sending messages. It commits a transaction automatically in case of a transactional session.

Creates a sink for sending messages. It commits a transaction automatically in case of a transactional session.

Type Params
A

message type

E

errors

R

dependencies

Value Params
acknowledgementMode

specifies acknowledgement mode of a session

destination

specifies destination

encoder

creates a JMS message from a provided message

transacted

specifies whether to use a transaction

Returns

a newly created sink