Class JmsSinkBuilder<T>

java.lang.Object
com.hazelcast.jet.pipeline.JmsSinkBuilder<T>
Type Parameters:
T - type of the items the sink accepts

public final class JmsSinkBuilder<T>
extends Object
Since:
3.0
  • Method Details

    • connectionParams

      public JmsSinkBuilder<T> connectionParams​(String username, String password)
      Sets the connection parameters. If connectionFn is provided, these parameters are ignored.
      Parameters:
      username - the username, Default value is null
      password - the password, Default value is null
    • connectionFn

      public JmsSinkBuilder<T> connectionFn​(@Nonnull FunctionEx<javax.jms.ConnectionFactory,​javax.jms.Connection> connectionFn)
      Sets the function which creates the connection from connection factory.

      If not provided, the builder creates a function which uses ConnectionFactory#createConnection(username, password) to create the connection. See connectionParams(String, String).

    • destinationName

      public JmsSinkBuilder<T> destinationName​(@Nonnull String destinationName)
      Sets the name of the destination.
    • messageFn

      public JmsSinkBuilder<T> messageFn​(BiFunctionEx<javax.jms.Session,​T,​javax.jms.Message> messageFn)
      Sets the function which creates the message from the item.

      If not provided, the builder creates a function which wraps item.toString() into a TextMessage, unless the item is already an instance of javax.jms.Message.

    • build

      public Sink<T> build()
      Creates and returns the JMS Sink with the supplied components.