Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Ingest #19

Merged
merged 13 commits into from
Jun 11, 2020
Merged

Ingest #19

merged 13 commits into from
Jun 11, 2020

Conversation

jbygdell
Copy link
Collaborator

@jbygdell jbygdell commented Jun 10, 2020

Basic ingest functionality on posix backend

Fixes #2

cmd/ingest/ingest.go Outdated Show resolved Hide resolved
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 {
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this block?

Copy link
Collaborator Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

// // 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 {
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

cmd/ingest/ingest.go Outdated Show resolved Hide resolved
cmd/ingest/ingest.go Outdated Show resolved Hide resolved
cmd/ingest/ingest.go Outdated Show resolved Hide resolved
Sensitive Data Archive Development automation moved this from Review in progress to Reviewer approved Jun 11, 2020
@jbygdell jbygdell merged commit 9d33943 into master Jun 11, 2020
Sensitive Data Archive Development automation moved this from Reviewer approved to Done Jun 11, 2020
@jbygdell jbygdell deleted the ingest branch June 11, 2020 12:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Ingest] copy file from inbox to archive
3 participants