Documentation ¶
Index ¶
- Constants
- func NewConnection(conn ConnectionConfig, auth Auth) (ibmmq.MQQueueManager, error)
- type Auth
- type ConnectionConfig
- type Delivery
- type Handler
- type Object
- func (q *Object) Close() error
- func (q *Object) DeleteMessageHandle() error
- func (q *Object) DeregisterCallback() error
- func (q *Object) PutToDLQ(mqmd *ibmmq.MQMD, data []byte) error
- func (q *Object) RegisterCallback(f Handler, delivery Delivery, logger *zap.SugaredLogger) error
- func (q *Object) StartListen(conn ibmmq.MQQueueManager) error
- func (q *Object) StopCallback(conn ibmmq.MQQueueManager) error
- type TLSConfig
Constants ¶
const ( CECorrelIDAttr = "correlationid" KeyRepositoryExtensions = ".kdb" )
IBM MQ source adapter constants.
Variables ¶
This section is empty.
Functions ¶
func NewConnection ¶
func NewConnection(conn ConnectionConfig, auth Auth) (ibmmq.MQQueueManager, error)
NewConnection creates the connection to IBM MQ server.
Types ¶
type Auth ¶ added in v1.14.0
type Auth struct { Username string `envconfig:"USER"` Password string `envconfig:"PASSWORD"` TLSConfig }
Auth contains IBM MQ authentication parameters.
type ConnectionConfig ¶ added in v1.14.0
type ConnectionConfig struct { QueueManager string `envconfig:"QUEUE_MANAGER"` ChannelName string `envconfig:"CHANNEL_NAME"` ConnectionName string `envconfig:"CONNECTION_NAME"` QueueName string `envconfig:"QUEUE_NAME"` }
ConnectionConfig is IBM MQ common connection parameters.
type Delivery ¶
type Delivery struct { DeadLetterQManager string `envconfig:"DEAD_LETTER_QUEUE_MANAGER"` DeadLetterQueue string `envconfig:"DEAD_LETTER_QUEUE"` BackoffDelay int `envconfig:"BACKOFF_DELAY"` Retry int `envconfig:"DELIVERY_RETRY"` }
Delivery holds the delivery parameters used in the source.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object is a local wrapper for IBM MQ objects required to communicate with the queue.
func (*Object) DeleteMessageHandle ¶
Deallocate the message handle
func (*Object) DeregisterCallback ¶
Deregister the callback function - have to do this before the message handle can be successfully deleted
func (*Object) RegisterCallback ¶
RegisterCallback registers the callback function for the incoming messages in the target queue.
func (*Object) StartListen ¶
func (q *Object) StartListen(conn ibmmq.MQQueueManager) error
StartListen sends the signal to IBM MQ server to start callback invocation.
func (*Object) StopCallback ¶
func (q *Object) StopCallback(conn ibmmq.MQQueueManager) error
Stop the callback function from being called again