-
Notifications
You must be signed in to change notification settings - Fork 5
Ingest #19
Conversation
internal/broker/broker.go
Outdated
func SendMessage(b *AMQPBroker, corrID, exchange, routingKey string , body []byte) error { | ||
func SendMessage(b *AMQPBroker, corrID, exchange, routingKey string, body []byte) error { | ||
// Set channel | ||
if e := b.Channel.Confirm(false); e != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this? What is it needed for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm puts this channel into confirm mode so that the client can ensure all publishings have successfully been received by the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this block?
block what? be more specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Jon means if it's blocking call or async one. And my guess would be that it's blocking, but I don't think that it matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is written to a channel, my guess is async. But I am not sure... The python code made blocking amqp calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's blocking in terms of programming, not in terms of messaging. I mean, it blocks for a time needed to put a message to a broker, but no longer.
internal/broker/broker.go
Outdated
// // One would typically keep a channel of publishings, a sequence number, and a | ||
// // set of unacknowledged sequence numbers and loop until the publishing channel | ||
// // is closed. | ||
func confirmOne(confirms <-chan amqp.Confirmation) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this? Why do we have a queue of confirmations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When writing to a durable exchange we want confirmation that the message has been persisted.
487ac7b
to
56ea0a6
Compare
set up storage backends and c4gh.
Add file writer and file size functions to posix backend
Basic ingest functionality on posix backend
Fixes #2