Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Hubs] Ensure receiver is functional #3356

Merged

Conversation

ShivangiReja
Copy link
Member

As per the API proposal in #2718 (comment), we will now have a createReceiver() method on the Event Hub Client that returns a receiver.

This PR ensures that:

  • receive, receiveBatch, getEventIterator method works as expected.
  • All tests in receiver.spec.ts are updated and pass
  • receiver.close() closees all the underlying AMQP links. Further operations throw error.

@ShivangiReja ShivangiReja added Client This issue points to a problem in the data-plane of the library. Event Hubs labels May 31, 2019
@ShivangiReja ShivangiReja requested a review from ramya-rao-a May 31, 2019 20:52
@ShivangiReja ShivangiReja self-assigned this May 31, 2019
sdk/eventhub/event-hubs/samples/receiveEventsLoop.ts Outdated Show resolved Hide resolved
sdk/eventhub/event-hubs/src/receiver.ts Outdated Show resolved Hide resolved
this._context.receivers[bReceiver.name] = bReceiver;
this._throwIfReceiverOrConnectionClosed();
this._batchingReceiver = BatchingReceiver.create(this._context, this.partitionId, this._receiverOptions);
this._context.receivers[this._batchingReceiver.name] = this._batchingReceiver;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like BatchingReceiver.create() function takes care of setting the receiver in the _context.receivers map. So we don't need this step

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't remove this before because I was planning to do the cleanup in the separate receiver link related issue.

sdk/eventhub/event-hubs/src/receiver.ts Outdated Show resolved Hide resolved
@ShivangiReja ShivangiReja merged commit c16040d into Azure:event-hubs-track2 May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants