mirror of https://github.com/tidwall/tile38.git
Added priority option for AMQP endpoints
This commit is contained in:
parent
70cd167fc0
commit
3718cd766b
|
@ -124,7 +124,7 @@ func (conn *AMQPConn) Send(msg string) error {
|
|||
ContentEncoding: "",
|
||||
Body: []byte(msg),
|
||||
DeliveryMode: conn.ep.AMQP.DeliveryMode,
|
||||
Priority: 0,
|
||||
Priority: conn.ep.AMQP.Priority,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ type Endpoint struct {
|
|||
Mandatory bool
|
||||
Immediate bool
|
||||
DeliveryMode uint8
|
||||
Priority uint8
|
||||
}
|
||||
MQTT struct {
|
||||
Host string
|
||||
|
@ -591,6 +592,8 @@ func parseEndpoint(s string) (Endpoint, error) {
|
|||
endpoint.AMQP.Mandatory = queryBool(val[0])
|
||||
case "delivery_mode":
|
||||
endpoint.AMQP.DeliveryMode = uint8(queryInt(val[0]))
|
||||
case "priority":
|
||||
endpoint.AMQP.Priority = uint8(queryInt(val[0]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue