Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AMQPReconnectDuration reconnect duration AMQPReconnectDuration = 1 // AMQPQueueStatusFreshDuration queue status refresh duration AMQPQueueStatusFreshDuration = 30 )
View Source
const ( ChannelConsumerDeliveryCheckIntervalSeconds = int64(9) JinDie = "_jindie_mq" // 获取金蝶环境变量的名字 )
Constants
Variables ¶
This section is empty.
Functions ¶
func SetupTrackerQueue ¶ added in v0.2.1
func SetupTrackerQueue(queueName string)
SetupTrackerQueue name
Types ¶
type AMQPConfig ¶
type AMQPConfig struct { ConnConfigName string Queue string QueueDurable bool BindingExchange bool ExchangeName string ExchangeType string BindingKey string QueueAutoDelete bool }
AMQPConfig queue config
func (*AMQPConfig) Clone ¶ added in v0.2.6
func (me *AMQPConfig) Clone() AMQPConfig
Clone a AMQPConfig object
func (*AMQPConfig) Equals ¶
func (me *AMQPConfig) Equals(to *AMQPConfig) bool
Equals check if equals
func (*AMQPConfig) IsBroadcastExange ¶ added in v0.1.5
func (me *AMQPConfig) IsBroadcastExange() bool
IsBroadcastExange check if the configure is fanout
type AMQPConsumerCallback ¶
type AMQPConsumerCallback func(amqp.Delivery) *mqenv.MQPublishMessage
AMQPConsumerCallback callback
type RabbitConsumerProxy ¶
type RabbitConsumerProxy struct { Queue string Callback AMQPConsumerCallback ConsumerTag string AutoAck bool Exclusive bool NoLocal bool NoWait bool Arguments amqp.Table // contains filtered or unexported fields }
RabbitConsumerProxy consumer proxy
func GenerateRabbitMQConsumerProxy ¶
func GenerateRabbitMQConsumerProxy(consumeProxy *mqenv.MQConsumerProxy, exchangeName string) *RabbitConsumerProxy
GenerateRabbitMQConsumerProxy generate rabbitmq consumer proxy
type RabbitMQ ¶
type RabbitMQ struct { Name string Publish chan *mqenv.MQPublishMessage Consume chan *RabbitConsumerProxy Done chan error Channel *amqp.Channel Conn *amqp.Connection Config *AMQPConfig ConnConfig *mqenv.MQConnectorConfig Close chan interface{} // contains filtered or unexported fields }
RabbitMQ instance
func InitRabbitMQ ¶
func InitRabbitMQ(mqConnName string, connCfg *mqenv.MQConnectorConfig, amqpCfg *AMQPConfig) (*RabbitMQ, error)
InitRabbitMQ init
func NewRabbitMQ ¶ added in v0.2.1
func NewRabbitMQ(mqConnName string, connCfg *mqenv.MQConnectorConfig, amqpCfg *AMQPConfig) *RabbitMQ
NewRabbitMQ with parameters
func (*RabbitMQ) CheckQueueConsumers ¶ added in v0.2.7
CheckQueueConsumers check if queue has consumers listening
func (*RabbitMQ) QueryRPC ¶ added in v0.2.1
func (r *RabbitMQ) QueryRPC(pm *mqenv.MQPublishMessage) (*mqenv.MQConsumerMessage, error)
QueryRPC publishes a message and waiting the response
type RabbitQueueStatus ¶
RabbitQueueStatus queue status
type RabbitRPC ¶ added in v0.2.1
RabbitRPC rpc instance
func GetRPCRabbitMQWithConsumers ¶ added in v0.2.7
GetRPCRabbitMQWithConsumers get instance
func GetRPCRabbitMQWithoutConnectedChecking ¶ added in v0.2.1
GetRPCRabbitMQWithoutConnectedChecking get instance
func InitRPCRabbitMQ ¶
func InitRPCRabbitMQ(key string, rpcType int, connCfg *mqenv.MQConnectorConfig, amqpCfg *AMQPConfig) *RabbitRPC
InitRPCRabbitMQ init
Click to show internal directories.
Click to hide internal directories.