Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
30ac167
Formatting changes in EventHubAsyncProducer.
conniey Aug 12, 2019
5c041aa
Adding EventHubClient, EventHubConsumer, and EventHubProducer.
conniey Aug 12, 2019
4f3bab3
Exposing EventHubClient creation in EventHubClientBuilder.
conniey Aug 12, 2019
5e10349
EventHubClient, Consumer and Producer implements Closeable.
conniey Aug 12, 2019
4727715
Fixing sample by removing event hub instance from namespace connectio…
conniey Aug 12, 2019
4c94da5
Remove unneeded sample in EventHubClientBuilder.
conniey Aug 12, 2019
42c099a
Add EventHubClient to builder annotation.
conniey Aug 12, 2019
d1ab53c
Update EventHubClientBuilder samples. Remove unneeded ones.
conniey Aug 12, 2019
eb02600
Update samples in EventHubClientBuilder.
conniey Aug 12, 2019
e473b67
Add documentation to EventHubConsumer.
conniey Aug 12, 2019
beb0090
Fixing links to EventHubAsyncProducer samples.
conniey Aug 13, 2019
17edced
Adding EventHubProducer code samples.
conniey Aug 13, 2019
d4a7871
Fixing spotbug issues.
conniey Aug 13, 2019
e4de89d
Update from Iterable to IterableResponse.
conniey Aug 13, 2019
1f48bf7
Make test contents package-private.
conniey Aug 13, 2019
49c2aaa
Update sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azur…
conniey Aug 13, 2019
3b5a012
Update sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azur…
conniey Aug 13, 2019
fd83955
Merge branch 'synchronous-client' of https://github.com/conniey/azure…
conniey Aug 13, 2019
0d40de4
Fix typo in connection strings.
conniey Aug 13, 2019
bbb1eb5
Fix javadoc errors.
conniey Aug 13, 2019
d4c89b2
Add Null checks for options.
conniey Aug 13, 2019
104fe4b
Fix null checks.
conniey Aug 13, 2019
d49d7c8
Remove unneeded log message.
conniey Aug 13, 2019
e942750
Adding tests for EventHubProducer.
conniey Aug 13, 2019
5f51b4e
Simplifying creation of EventHubAsyncProducer
conniey Aug 13, 2019
1018908
Remove redundant null check.
conniey Aug 13, 2019
470f4ef
Select correct retryDuration when constructing EventHubProducer.
conniey Aug 13, 2019
c648c2e
Adding EventHubProducer tests.
conniey Aug 13, 2019
cfb1d11
Add correct header file.
conniey Aug 13, 2019
f7cf4e4
Rename EventHubClientIntegrationTest -> EventHubAsyncClientIntegratio…
conniey Aug 13, 2019
48b960a
Add integration tests for EventHubClient.
conniey Aug 13, 2019
4f26053
Make EventHubConsumer methods public
conniey Aug 14, 2019
dbe3d82
Fix spotbug issues
conniey Aug 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add documentation to EventHubConsumer.
  • Loading branch information
conniey committed Aug 13, 2019
commit e473b67e03f0d18aabd3a5208fbd3bf2b061f05b
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,52 @@

package com.azure.messaging.eventhubs;

import com.azure.core.http.rest.IterableResponse;
import com.azure.messaging.eventhubs.models.EventHubConsumerOptions;
import com.azure.messaging.eventhubs.models.EventPosition;
import reactor.core.publisher.Flux;

import java.io.Closeable;
import java.io.IOException;
import java.time.Duration;

/**
* A consumer responsible for reading {@link EventData} from a specific Event Hub partition in the context of a specific
* consumer group.
*
* <ul>
* <li>If {@link EventHubConsumer} is created where {@link EventHubConsumerOptions#ownerLevel()} has a
* value, then Event Hubs service will guarantee only one active consumer exists per partitionId and consumer group
* combination. This consumer is sometimes referred to as an "Epoch Consumer."</li>
* <li>Multiple consumers per partitionId and consumer group combination can be created by not setting
* {@link EventHubConsumerOptions#ownerLevel()} when creating consumers. This non-exclusive consumer is sometimes
* referred to as a "Non-Epoch Consumer."</li>
* </ul>
*
* @see EventHubClient#createConsumer(String, String, EventPosition)
* @see EventHubClient#createConsumer(String, String, EventPosition, EventHubConsumerOptions)
*/
public class EventHubConsumer implements Closeable {
/**
* Receives a batch of EventData from the Event Hub partition.
*
* @param maximumMessageCount The maximum number of messages to receive in this batch.
*/
IterableResponse<EventData> receive(int maximumMessageCount) {
return new IterableResponse<>(Flux.empty());
}

/**
* Receives a batch of EventData from the Event Hub partition
*
* @param maximumMessageCount The maximum number of messages to receive in this batch.
* @param maximumWaitTime The maximum amount of time to wait to build up the requested message count for the
* batch; if not specified, the default wait time specified when the consumer was created will be used.
*/
IterableResponse<EventData> receive(int maximumMessageCount, Duration maximumWaitTime) {
return new IterableResponse<>(Flux.empty());
}

/**
* {@inheritDoc}
*/
Expand Down