Skip to content

How to send message to default exchange? #91

Answered by Gsantomaggio
Gauthamraju31 asked this question in Q&A
Discussion options

You must be logged in to vote
channel.Publish(
			"",   // default Exchange 
			routingKey, // queue name
			false,      // mandatory
			false,      // immediate
			amqp.Publishing{
				Headers:         amqp.Table{},
				ContentType:     "text/plain",
				ContentEncoding: "",
				Body:            []byte(body),
				DeliveryMode:    amqp.Transient, // 1=non-persistent, 2=persistent
				Priority:        0,              // 0-9
				// a bunch of application/implementation-specific fields
			},

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gauthamraju31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants