public final class ReceiverOptions extends Object
PartitionReceiver.| Constructor and Description |
|---|
ReceiverOptions() |
| Modifier and Type | Method and Description |
|---|---|
String |
getIdentifier()
Gets the identifier of the
PartitionReceiver |
boolean |
getReceiverRuntimeMetricEnabled()
Knob to enable/disable runtime metric of the receiver.
|
void |
setIdentifier(String value)
Set an identifier to
PartitionReceiver. |
void |
setReceiverRuntimeMetricEnabled(boolean value)
Knob to enable/disable runtime metric of the receiver.
|
public boolean getReceiverRuntimeMetricEnabled()
EventHubClient.createReceiver(java.lang.String, java.lang.String, java.lang.String),
after the first PartitionReceiver.receive(int) call, PartitionReceiver.getRuntimeInformation() is populated.
Enabling this knob will add 3 additional properties to all EventData's received on the EventHubClient.createReceiver(java.lang.String, java.lang.String, java.lang.String).
boolean indicating, whether, the runtime metric of the receiver was enabledpublic void setReceiverRuntimeMetricEnabled(boolean value)
EventHubClient.createReceiver(java.lang.String, java.lang.String, java.lang.String),
after the first PartitionReceiver.receive(int) call, PartitionReceiver.getRuntimeInformation() is populated.
Enabling this knob will add 3 additional properties to all EventData's received on the EventHubClient.createReceiver(java.lang.String, java.lang.String, java.lang.String).
value - the boolean to indicate, whether, the runtime metric of the receiver should be enabledpublic String getIdentifier()
PartitionReceiverPartitionReceiver; null if nothing was setpublic void setIdentifier(String value)
PartitionReceiver.
This identifier will be used by EventHubs service when reporting any errors across receivers, and is caused by this receiver.
For example, when receiver quota limit is hit, while a user is trying to create New receiver,
EventHubs service will throw QuotaExceededException and will include this identifier.
So, its very critical to choose a value, which can uniquely identify the whereabouts of PartitionReceiver.
value - string to identify PartitionReceiverCopyright © 2017. All rights reserved.