mq

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CECorrelIDAttr          = "correlationid"
	KeyRepositoryExtensions = ".kdb"
)

IBM MQ target 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.1

type Auth struct {
	Username string `envconfig:"USER"`
	Password string `envconfig:"PASSWORD"`
	TLSConfig
}

Auth contains IBM MQ authentication parameters.

type ConnectionConfig added in v1.14.1

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 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 OpenQueue

func OpenQueue(queueName string, replyTo *ReplyTo, conn ibmmq.MQQueueManager) (Object, error)

OpenQueue opens IBM MQ queue.

func (*Object) Close

func (q *Object) Close() error

Close closes the queue.

func (*Object) Put

func (q *Object) Put(data []byte, ceCorrelID string) error

Put puts the message to the queue.

type ReplyTo

type ReplyTo struct {
	Manager string `envconfig:"REPLY_TO_MANAGER"`
	Queue   string `envconfig:"REPLY_TO_QUEUE"`
}

ReplyTo holds the data used in MQ's Reply-to header.

type TLSConfig added in v1.14.1

type TLSConfig struct {
	Cipher             string `envconfig:"TLS_CIPHER"`
	ClientAuthRequired bool   `envconfig:"TLS_CLIENT_AUTH"`
	CertLabel          string `envconfig:"TLS_CERT_LABEL"`
}

TLSConfig holds TLS connection parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL