-
Notifications
You must be signed in to change notification settings - Fork 223
/
com.microsoft.azure.eventhubs.EventHubClient.yml
836 lines (836 loc) · 107 KB
/
com.microsoft.azure.eventhubs.EventHubClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
### YamlMime:JavaType
uid: "com.microsoft.azure.eventhubs.EventHubClient"
fullName: "com.microsoft.azure.eventhubs.EventHubClient"
name: "EventHubClient"
nameWithType: "EventHubClient"
summary: "Anchor class - all Event<wbr>Hub client operations STARTS here."
syntax: "public interface **EventHubClient**"
fields:
- uid: "com.microsoft.azure.eventhubs.EventHubClient.DEFAULT_CONSUMER_GROUP_NAME"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.DEFAULT_CONSUMER_GROUP_NAME"
name: "DEFAULT_CONSUMER_GROUP_NAME"
nameWithType: "EventHubClient.DEFAULT_CONSUMER_GROUP_NAME"
modifiers:
- "static"
- "final"
field:
value: "$Default"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public static final String DEFAULT_CONSUMER_GROUP_NAME"
methods:
- uid: "com.microsoft.azure.eventhubs.EventHubClient.close()"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.close()"
name: "close()"
nameWithType: "EventHubClient.close()"
modifiers:
- "abstract"
syntax: "public abstract CompletableFuture<Void> close()"
returns:
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.closeSync()"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.closeSync()"
name: "closeSync()"
nameWithType: "EventHubClient.closeSync()"
modifiers:
- "abstract"
syntax: "public abstract void closeSync()"
exceptions:
- type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createBatch()"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createBatch()"
name: "createBatch()"
nameWithType: "EventHubClient.createBatch()"
summary: "Creates an Empty Collection of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>."
modifiers:
- "default"
syntax: "public default EventDataBatch createBatch()"
exceptions:
- description: "if the Microsoft Azure Event Hubs service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Creates an Empty Collection of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>. The same partitionKey must be used while sending these events using <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventDataBatch)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient#send(EventDataBatch)\"></xref>."
returns:
description: "the empty <xref uid=\"com.microsoft.azure.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref>, after negotiating maximum message size with EventHubs service"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventDataBatch?alt=com.microsoft.azure.eventhubs.EventDataBatch&text=EventDataBatch\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createBatch(com.microsoft.azure.eventhubs.BatchOptions)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createBatch(BatchOptions options)"
name: "createBatch(BatchOptions options)"
nameWithType: "EventHubClient.createBatch(BatchOptions options)"
summary: "Creates an Empty Collection of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>."
modifiers:
- "abstract"
parameters:
- description: "see <xref uid=\"com.microsoft.azure.eventhubs.BatchOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BatchOptions\"></xref> for more details"
name: "options"
type: "<xref href=\"com.microsoft.azure.eventhubs.BatchOptions?alt=com.microsoft.azure.eventhubs.BatchOptions&text=BatchOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract EventDataBatch createBatch(BatchOptions options)"
exceptions:
- description: "if the Microsoft Azure Event Hubs service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Creates an Empty Collection of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>. The same partitionKey must be used while sending these events using <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventDataBatch)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient#send(EventDataBatch)\"></xref>."
returns:
description: "the empty <xref uid=\"com.microsoft.azure.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref>, after negotiating maximum message size with EventHubs service"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventDataBatch?alt=com.microsoft.azure.eventhubs.EventDataBatch&text=EventDataBatch\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
name: "createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
nameWithType: "EventHubClient.createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
summary: "Create a Epoch based Event<wbr>Hub receiver with given partition id and start receiving from the beginning of the partition stream."
modifiers:
- "abstract"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
- description: "an unique identifier (epoch value) that the service uses, to enforce partition/lease ownership."
name: "epoch"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract CompletableFuture<PartitionReceiver> createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Create a Epoch based EventHub receiver with given partition id and start receiving from the beginning of the partition stream. The receiver is created for a specific EventHub Partition from the specific consumer group.\n\nIt is important to pay attention to the following when creating epoch based receiver:\n\n * Ownership enforcement - Once you created an epoch based receiver, you cannot create a non-epoch receiver to the same consumerGroup-Partition combo until all receivers to the combo are closed.\n * Ownership stealing - If a receiver with higher epoch value is created for a consumerGroup-Partition combo, any older epoch receiver to that combo will be force closed.\n * Any receiver closed due to lost of ownership to a consumerGroup-Partition combo will get ReceiverDisconnectedException for all operations from that receiver."
returns:
description: "a CompletableFuture that would result in a PartitionReceiver when it is completed."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long,com.microsoft.azure.eventhubs.ReceiverOptions)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
name: "createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
nameWithType: "EventHubClient.createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
summary: "Create a Epoch based Event<wbr>Hub receiver with given partition id and start receiving from the beginning of the partition stream."
modifiers:
- "abstract"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
- description: "an unique identifier (epoch value) that the service uses, to enforce partition/lease ownership."
name: "epoch"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "the set of options to enable on the event hubs receiver"
name: "receiverOptions"
type: "<xref href=\"com.microsoft.azure.eventhubs.ReceiverOptions?alt=com.microsoft.azure.eventhubs.ReceiverOptions&text=ReceiverOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract CompletableFuture<PartitionReceiver> createEpochReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Create a Epoch based EventHub receiver with given partition id and start receiving from the beginning of the partition stream. The receiver is created for a specific EventHub Partition from the specific consumer group.\n\nIt is important to pay attention to the following when creating epoch based receiver:\n\n * Ownership enforcement - Once you created an epoch based receiver, you cannot create a non-epoch receiver to the same consumerGroup-Partition combo until all receivers to the combo are closed.\n * Ownership stealing - If a receiver with higher epoch value is created for a consumerGroup-Partition combo, any older epoch receiver to that combo will be force closed.\n * Any receiver closed due to lost of ownership to a consumerGroup-Partition combo will get ReceiverDisconnectedException for all operations from that receiver."
returns:
description: "a CompletableFuture that would result in a PartitionReceiver when it is completed."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiverSync(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
name: "createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
nameWithType: "EventHubClient.createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createEpochReceiver(String, String, EventPosition, long)\"></xref>."
modifiers:
- "default"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
- description: "an unique identifier (epoch value) that the service uses, to enforce partition/lease ownership."
name: "epoch"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public default PartitionReceiver createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createEpochReceiver(String, String, EventPosition, long)\"></xref>."
returns:
description: "PartitionReceiver instance which can be used for receiving <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>."
type: "<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiverSync(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long,com.microsoft.azure.eventhubs.ReceiverOptions)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
name: "createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
nameWithType: "EventHubClient.createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createEpochReceiver(String, String, EventPosition, long)\"></xref>."
modifiers:
- "default"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
- description: "an unique identifier (epoch value) that the service uses, to enforce partition/lease ownership."
name: "epoch"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "the set of options to enable on the event hubs receiver"
name: "receiverOptions"
type: "<xref href=\"com.microsoft.azure.eventhubs.ReceiverOptions?alt=com.microsoft.azure.eventhubs.ReceiverOptions&text=ReceiverOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public default PartitionReceiver createEpochReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, long epoch, ReceiverOptions receiverOptions)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createEpochReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createEpochReceiver(String, String, EventPosition, long)\"></xref>."
returns:
description: "PartitionReceiver instance which can be used for receiving <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>."
type: "<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
name: "createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
nameWithType: "EventHubClient.createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
summary: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied connection<wbr>String."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A custom <xref uid=\"com.microsoft.azure.eventhubs.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> to be used when communicating with EventHub."
name: "retryPolicy"
type: "<xref href=\"com.microsoft.azure.eventhubs.RetryPolicy?alt=com.microsoft.azure.eventhubs.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
syntax: "public static CompletableFuture<EventHubClient> createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
exceptions:
- description: "If the underlying Proton-J layer encounter network errors."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied connectionString. In a normal scenario (when re-direct is not enabled) - one EventHubClient instance maps to one Connection to the Azure ServiceBus EventHubs service.\n\nThe <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> created from this method creates a Sender instance internally, which is used by the <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref> methods."
returns:
description: "CompletableFuture<EventHubClient> which can be used to create Senders and Receivers to EventHub"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration)"
name: "createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration)"
nameWithType: "EventHubClient.createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration)"
summary: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied `connectionString`."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A custom <xref uid=\"com.microsoft.azure.eventhubs.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> to be used when communicating with EventHub."
name: "retryPolicy"
type: "<xref href=\"com.microsoft.azure.eventhubs.RetryPolicy?alt=com.microsoft.azure.eventhubs.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
- description: "The proxy configuration for this EventHubClient connection; <code>null</code> or\n <xref uid=\"com.microsoft.azure.eventhubs.ProxyConfiguration.SYSTEM_DEFAULTS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ProxyConfiguration#SYSTEM_DEFAULTS\"></xref> if the system configured proxy settings should be used."
name: "proxyConfiguration"
type: "<xref href=\"com.microsoft.azure.eventhubs.ProxyConfiguration?alt=com.microsoft.azure.eventhubs.ProxyConfiguration&text=ProxyConfiguration\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static CompletableFuture<EventHubClient> createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration)"
exceptions:
- description: "If the underlying Proton-J layer encounter network errors."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied `connectionString`. One EventHubClient instance maps to one connection to the Event Hubs service.\n\nThe <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> created from this method creates a Sender instance internally, which is used by the <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref> methods."
returns:
description: "CompletableFuture<EventHubClient> which can be used to create Senders and Receivers to EventHub."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration,java.time.Duration)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration, Duration maximumSilentTime)"
name: "createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration, Duration maximumSilentTime)"
nameWithType: "EventHubClient.createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration, Duration maximumSilentTime)"
summary: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied `connectionString`."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A custom <xref uid=\"com.microsoft.azure.eventhubs.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> to be used when communicating with EventHub."
name: "retryPolicy"
type: "<xref href=\"com.microsoft.azure.eventhubs.RetryPolicy?alt=com.microsoft.azure.eventhubs.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
- description: "The proxy configuration for this EventHubClient connection; <code>null</code> or\n <xref uid=\"com.microsoft.azure.eventhubs.ProxyConfiguration.SYSTEM_DEFAULTS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ProxyConfiguration#SYSTEM_DEFAULTS\"></xref> if the system configured proxy settings should be used."
name: "proxyConfiguration"
type: "<xref href=\"com.microsoft.azure.eventhubs.ProxyConfiguration?alt=com.microsoft.azure.eventhubs.ProxyConfiguration&text=ProxyConfiguration\" data-throw-if-not-resolved=\"False\" />"
- description: "Use <xref uid=\"com.microsoft.azure.eventhubs.EventHubClientOptions.SILENT_OFF\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClientOptions#SILENT_OFF\"></xref> except on recommendation from the product group."
name: "maximumSilentTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public static CompletableFuture<EventHubClient> createFromConnectionString(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration proxyConfiguration, Duration maximumSilentTime)"
exceptions:
- description: "If the underlying Proton-J layer encounter network errors."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied `connectionString`. One EventHubClient instance maps to one connection to the Event Hubs service.\n\nThe <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> created from this method creates a Sender instance internally, which is used by the <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref> methods."
returns:
description: "CompletableFuture<EventHubClient> which can be used to create Senders and Receivers to EventHub."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,java.util.concurrent.ScheduledExecutorService)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(String connectionString, ScheduledExecutorService executor)"
name: "createFromConnectionString(String connectionString, ScheduledExecutorService executor)"
nameWithType: "EventHubClient.createFromConnectionString(String connectionString, ScheduledExecutorService executor)"
summary: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied connection<wbr>String."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
syntax: "public static CompletableFuture<EventHubClient> createFromConnectionString(String connectionString, ScheduledExecutorService executor)"
exceptions:
- description: "If the underlying Proton-J layer encounter network errors."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied connectionString. In a normal scenario (when re-direct is not enabled) - one EventHubClient instance maps to one Connection to the Azure ServiceBus EventHubs service.\n\nThe <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> created from this method creates a Sender instance internally, which is used by the <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref> methods."
returns:
description: "CompletableFuture<EventHubClient> which can be used to create Senders and Receivers to EventHub"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
name: "createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
nameWithType: "EventHubClient.createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,java.util.concurrent.ScheduledExecutorService)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, ScheduledExecutorService)\"></xref>."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A custom <xref uid=\"com.microsoft.azure.eventhubs.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> to be used when communicating with EventHub."
name: "retryPolicy"
type: "<xref href=\"com.microsoft.azure.eventhubs.RetryPolicy?alt=com.microsoft.azure.eventhubs.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
syntax: "public static EventHubClient createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor)"
exceptions:
- description: "If Service Bus service encountered problems during connection creation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
- description: "If Service Bus service encountered problems during connection creation."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,java.util.concurrent.ScheduledExecutorService)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, ScheduledExecutorService)\"></xref>."
returns:
description: "EventHubClient which can be used to create Senders and Receivers to EventHub"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration)"
name: "createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration)"
nameWithType: "EventHubClient.createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, RetryPolicy, ScheduledExecutorService, ProxyConfiguration)\"></xref>."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A custom <xref uid=\"com.microsoft.azure.eventhubs.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> to be used when communicating with EventHub."
name: "retryPolicy"
type: "<xref href=\"com.microsoft.azure.eventhubs.RetryPolicy?alt=com.microsoft.azure.eventhubs.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
- description: "The proxy configuration for this EventHubClient connection; <code>null</code> or\n <xref uid=\"com.microsoft.azure.eventhubs.ProxyConfiguration.SYSTEM_DEFAULTS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ProxyConfiguration#SYSTEM_DEFAULTS\"></xref> if the system configured proxy settings should be used."
name: "configuration"
type: "<xref href=\"com.microsoft.azure.eventhubs.ProxyConfiguration?alt=com.microsoft.azure.eventhubs.ProxyConfiguration&text=ProxyConfiguration\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static EventHubClient createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration)"
exceptions:
- description: "If Service Bus service encountered problems during connection creation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
- description: "If Service Bus service encountered problems during connection creation."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, RetryPolicy, ScheduledExecutorService, ProxyConfiguration)\"></xref>."
returns:
description: "EventHubClient which can be used to create Senders and Receivers to EventHub"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration,java.time.Duration)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration, Duration maximumSilentTime)"
name: "createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration, Duration maximumSilentTime)"
nameWithType: "EventHubClient.createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration, Duration maximumSilentTime)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration,java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, RetryPolicy, ScheduledExecutorService, ProxyConfiguration, Duration)\"></xref>."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A custom <xref uid=\"com.microsoft.azure.eventhubs.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> to be used when communicating with EventHub."
name: "retryPolicy"
type: "<xref href=\"com.microsoft.azure.eventhubs.RetryPolicy?alt=com.microsoft.azure.eventhubs.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
- description: "The proxy configuration for this EventHubClient connection; <code>null</code> or\n <xref uid=\"com.microsoft.azure.eventhubs.ProxyConfiguration.SYSTEM_DEFAULTS\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ProxyConfiguration#SYSTEM_DEFAULTS\"></xref> if the system configured proxy settings should be used."
name: "configuration"
type: "<xref href=\"com.microsoft.azure.eventhubs.ProxyConfiguration?alt=com.microsoft.azure.eventhubs.ProxyConfiguration&text=ProxyConfiguration\" data-throw-if-not-resolved=\"False\" />"
- description: "Use <xref uid=\"com.microsoft.azure.eventhubs.EventHubClientOptions.SILENT_OFF\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClientOptions#SILENT_OFF\"></xref> except on recommendation from the product group."
name: "maximumSilentTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public static EventHubClient createFromConnectionStringSync(String connectionString, RetryPolicy retryPolicy, ScheduledExecutorService executor, ProxyConfiguration configuration, Duration maximumSilentTime)"
exceptions:
- description: "If Service Bus service encountered problems during connection creation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
- description: "If Service Bus service encountered problems during connection creation."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,com.microsoft.azure.eventhubs.RetryPolicy,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.ProxyConfiguration,java.time.Duration)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, RetryPolicy, ScheduledExecutorService, ProxyConfiguration, Duration)\"></xref>."
returns:
description: "EventHubClient which can be used to create Senders and Receivers to EventHub"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(java.lang.String,java.util.concurrent.ScheduledExecutorService)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionStringSync(String connectionString, ScheduledExecutorService executor)"
name: "createFromConnectionStringSync(String connectionString, ScheduledExecutorService executor)"
nameWithType: "EventHubClient.createFromConnectionStringSync(String connectionString, ScheduledExecutorService executor)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,java.util.concurrent.ScheduledExecutorService)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, ScheduledExecutorService)\"></xref>."
modifiers:
- "static"
parameters:
- description: "The connection string to be used. See <xref uid=\"com.microsoft.azure.eventhubs.ConnectionStringBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ConnectionStringBuilder\"></xref> to construct a connectionString."
name: "connectionString"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
syntax: "public static EventHubClient createFromConnectionStringSync(String connectionString, ScheduledExecutorService executor)"
exceptions:
- description: "If Service Bus service encountered problems during connection creation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
- description: "If Service Bus service encountered problems during connection creation."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createFromConnectionString(java.lang.String,java.util.concurrent.ScheduledExecutorService)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createFromConnectionString(String, ScheduledExecutorService)\"></xref>."
returns:
description: "EventHubClient which can be used to create Senders and Receivers to EventHub"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createPartitionSender(java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createPartitionSender(String partitionId)"
name: "createPartitionSender(String partitionId)"
nameWithType: "EventHubClient.createPartitionSender(String partitionId)"
summary: "Create a <xref uid=\"com.microsoft.azure.eventhubs.PartitionSender\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionSender\"></xref> which can publish <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s directly to a specific Event<wbr>Hub partition (sender type iii."
modifiers:
- "abstract"
parameters:
- description: "partitionId of EventHub to send the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s to"
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public abstract CompletableFuture<PartitionSender> createPartitionSender(String partitionId)"
exceptions:
- description: "if Service Bus service encountered problems during connection creation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Create a <xref uid=\"com.microsoft.azure.eventhubs.PartitionSender\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionSender\"></xref> which can publish <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s directly to a specific EventHub partition (sender type iii. in the below list).\n\nThere are 3 patterns/ways to send to EventHubs:\n\n```java\ni. or \n ii. or \n iii. or\n```"
returns:
description: "a CompletableFuture that would result in a PartitionSenderImpl when it is completed."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.PartitionSender?alt=com.microsoft.azure.eventhubs.PartitionSender&text=PartitionSender\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createPartitionSenderSync(java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createPartitionSenderSync(String partitionId)"
name: "createPartitionSenderSync(String partitionId)"
nameWithType: "EventHubClient.createPartitionSenderSync(String partitionId)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createPartitionSender(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createPartitionSender(String)\"></xref>."
modifiers:
- "default"
parameters:
- description: "partitionId of EventHub to send the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s to"
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public default PartitionSender createPartitionSenderSync(String partitionId)"
exceptions:
- description: "if Service Bus service encountered problems during connection creation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
- description: "if Service Bus service encountered problems during connection creation."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html\">IllegalArgumentException</a>"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createPartitionSender(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createPartitionSender(String)\"></xref>."
returns:
description: "PartitionSenderImpl which can be used to send events to a specific partition."
type: "<xref href=\"com.microsoft.azure.eventhubs.PartitionSender?alt=com.microsoft.azure.eventhubs.PartitionSender&text=PartitionSender\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition)"
name: "createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition)"
nameWithType: "EventHubClient.createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition)"
summary: "Create the Event<wbr>Hub receiver with given partition id and start receiving from the specified starting offset."
modifiers:
- "abstract"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract CompletableFuture<PartitionReceiver> createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Create the EventHub receiver with given partition id and start receiving from the specified starting offset. The receiver is created for a specific EventHub Partition from the specific consumer group."
returns:
description: "a CompletableFuture that would result in a PartitionReceiver instance when it is completed."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,com.microsoft.azure.eventhubs.ReceiverOptions)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
name: "createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
nameWithType: "EventHubClient.createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
summary: "Create the Event<wbr>Hub receiver with given partition id and start receiving from the specified starting offset."
modifiers:
- "abstract"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
- description: "the set of options to enable on the event hubs receiver"
name: "receiverOptions"
type: "<xref href=\"com.microsoft.azure.eventhubs.ReceiverOptions?alt=com.microsoft.azure.eventhubs.ReceiverOptions&text=ReceiverOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract CompletableFuture<PartitionReceiver> createReceiver(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Create the EventHub receiver with given partition id and start receiving from the specified starting offset. The receiver is created for a specific EventHub Partition from the specific consumer group."
returns:
description: "a CompletableFuture that would result in a PartitionReceiver instance when it is completed."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createReceiverSync(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition)"
name: "createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition)"
nameWithType: "EventHubClient.createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createReceiver(String, String, EventPosition)\"></xref>."
modifiers:
- "default"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
syntax: "public default PartitionReceiver createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createReceiver(String, String, EventPosition)\"></xref>."
returns:
description: "PartitionReceiver instance which can be used for receiving <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>."
type: "<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createReceiverSync(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition,com.microsoft.azure.eventhubs.ReceiverOptions)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
name: "createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
nameWithType: "EventHubClient.createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createReceiver(String, String, EventPosition)\"></xref>."
modifiers:
- "default"
parameters:
- description: "the consumer group name that this receiver should be grouped under."
name: "consumerGroupName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition Id that the receiver belongs to. All data received will be from this partition only."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the position to start receiving the events from. See <xref uid=\"com.microsoft.azure.eventhubs.EventPosition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventPosition\"></xref>"
name: "eventPosition"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventPosition?alt=com.microsoft.azure.eventhubs.EventPosition&text=EventPosition\" data-throw-if-not-resolved=\"False\" />"
- description: "the set of options to enable on the event hubs receiver"
name: "receiverOptions"
type: "<xref href=\"com.microsoft.azure.eventhubs.ReceiverOptions?alt=com.microsoft.azure.eventhubs.ReceiverOptions&text=ReceiverOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public default PartitionReceiver createReceiverSync(String consumerGroupName, String partitionId, EventPosition eventPosition, ReceiverOptions receiverOptions)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.createReceiver(java.lang.String,java.lang.String,com.microsoft.azure.eventhubs.EventPosition)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#createReceiver(String, String, EventPosition)\"></xref>."
returns:
description: "PartitionReceiver instance which can be used for receiving <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>."
type: "<xref href=\"com.microsoft.azure.eventhubs.PartitionReceiver?alt=com.microsoft.azure.eventhubs.PartitionReceiver&text=PartitionReceiver\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createWithAzureActiveDirectory(java.net.URI,java.lang.String,com.microsoft.azure.eventhubs.AzureActiveDirectoryTokenProvider.AuthenticationCallback,java.lang.String,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.EventHubClientOptions)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createWithAzureActiveDirectory(URI endpointAddress, String eventHubName, AzureActiveDirectoryTokenProvider.AuthenticationCallback authCallback, String authority, ScheduledExecutorService executor, EventHubClientOptions options)"
name: "createWithAzureActiveDirectory(URI endpointAddress, String eventHubName, AzureActiveDirectoryTokenProvider.AuthenticationCallback authCallback, String authority, ScheduledExecutorService executor, EventHubClientOptions options)"
nameWithType: "EventHubClient.createWithAzureActiveDirectory(URI endpointAddress, String eventHubName, AzureActiveDirectoryTokenProvider.AuthenticationCallback authCallback, String authority, ScheduledExecutorService executor, EventHubClientOptions options)"
summary: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied namespace endpoint address, eventhub name and authentication mechanism."
modifiers:
- "static"
parameters:
- description: "namespace level endpoint. This needs to be in the format of scheme://fullyQualifiedServiceBusNamespaceEndpointName"
name: "endpointAddress"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/net/URI.html\">URI</a>"
- description: "EventHub name"
name: "eventHubName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A callback which returns a JSON Web Token obtained from AAD."
name: "authCallback"
type: "<xref href=\"com.microsoft.azure.eventhubs.AzureActiveDirectoryTokenProvider.AuthenticationCallback?alt=com.microsoft.azure.eventhubs.AzureActiveDirectoryTokenProvider.AuthenticationCallback&text=AuthenticationCallback\" data-throw-if-not-resolved=\"False\" />"
- description: "Address of the AAD authority to issue the token."
name: "authority"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
- description: "Options <xref uid=\"com.microsoft.azure.eventhubs.EventHubClientOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClientOptions\"></xref> for creating the client. Uses all defaults if null."
name: "options"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubClientOptions?alt=com.microsoft.azure.eventhubs.EventHubClientOptions&text=EventHubClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static CompletableFuture<EventHubClient> createWithAzureActiveDirectory(URI endpointAddress, String eventHubName, AzureActiveDirectoryTokenProvider.AuthenticationCallback authCallback, String authority, ScheduledExecutorService executor, EventHubClientOptions options)"
exceptions:
- description: "If the underlying Proton-J layer encounter network errors."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied namespace endpoint address, eventhub name and authentication mechanism. In a normal scenario (when re-direct is not enabled) - one EventHubClient instance maps to one Connection to the Azure ServiceBus EventHubs service.\n\nThe <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> created from this method creates a Sender instance internally, which is used by the <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref> methods."
returns:
description: "EventHubClient which can be used to create Senders and Receivers to EventHub"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.createWithTokenProvider(java.net.URI,java.lang.String,com.microsoft.azure.eventhubs.ITokenProvider,java.util.concurrent.ScheduledExecutorService,com.microsoft.azure.eventhubs.EventHubClientOptions)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.createWithTokenProvider(URI endpointAddress, String eventHubName, ITokenProvider tokenProvider, ScheduledExecutorService executor, EventHubClientOptions options)"
name: "createWithTokenProvider(URI endpointAddress, String eventHubName, ITokenProvider tokenProvider, ScheduledExecutorService executor, EventHubClientOptions options)"
nameWithType: "EventHubClient.createWithTokenProvider(URI endpointAddress, String eventHubName, ITokenProvider tokenProvider, ScheduledExecutorService executor, EventHubClientOptions options)"
summary: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied namespace endpoint address, eventhub name and authentication mechanism."
modifiers:
- "static"
parameters:
- description: "namespace level endpoint. This needs to be in the format of scheme://fullyQualifiedServiceBusNamespaceEndpointName"
name: "endpointAddress"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/net/URI.html\">URI</a>"
- description: "EventHub name"
name: "eventHubName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The <xref uid=\"com.microsoft.azure.eventhubs.ITokenProvider\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ITokenProvider\"></xref> implementation to be used to authenticate"
name: "tokenProvider"
type: "<xref href=\"com.microsoft.azure.eventhubs.ITokenProvider?alt=com.microsoft.azure.eventhubs.ITokenProvider&text=ITokenProvider\" data-throw-if-not-resolved=\"False\" />"
- description: "An <xref uid=\"java.util.concurrent.ScheduledExecutorService\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ScheduledExecutorService\"></xref> to run all tasks performed by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref>."
name: "executor"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html\">ScheduledExecutorService</a>"
- description: "Options <xref uid=\"com.microsoft.azure.eventhubs.EventHubClientOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClientOptions\"></xref> for creating the client. Uses all defaults if null."
name: "options"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubClientOptions?alt=com.microsoft.azure.eventhubs.EventHubClientOptions&text=EventHubClientOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static CompletableFuture<EventHubClient> createWithTokenProvider(URI endpointAddress, String eventHubName, ITokenProvider tokenProvider, ScheduledExecutorService executor, EventHubClientOptions options)"
exceptions:
- description: "If the underlying Proton-J layer encounter network errors."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
desc: "Factory method to create an instance of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> using the supplied namespace endpoint address, eventhub name and authentication mechanism. In a normal scenario (when re-direct is not enabled) - one EventHubClient instance maps to one Connection to the Azure ServiceBus EventHubs service.\n\nThe <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubClient\"></xref> created from this method creates a Sender instance internally, which is used by the <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref> methods."
returns:
description: "EventHubClient which can be used to create Senders and Receivers to EventHub"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.EventHubClient?alt=com.microsoft.azure.eventhubs.EventHubClient&text=EventHubClient\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.getEventHubName()"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.getEventHubName()"
name: "getEventHubName()"
nameWithType: "EventHubClient.getEventHubName()"
modifiers:
- "abstract"
syntax: "public abstract String getEventHubName()"
returns:
description: "the name of the Event Hub this client is connected to."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.getPartitionRuntimeInformation(java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.getPartitionRuntimeInformation(String partitionId)"
name: "getPartitionRuntimeInformation(String partitionId)"
nameWithType: "EventHubClient.getPartitionRuntimeInformation(String partitionId)"
summary: "Retrieves dynamic information about a partition of an event hub (see <xref uid=\"com.microsoft.azure.eventhubs.PartitionRuntimeInformation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionRuntimeInformation\"></xref> for details."
modifiers:
- "abstract"
parameters:
- description: "Partition to get information about. Must be one of the partition ids returned by <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.getRuntimeInformation*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getRuntimeInformation\"></xref>."
name: "partitionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public abstract CompletableFuture<PartitionRuntimeInformation> getPartitionRuntimeInformation(String partitionId)"
desc: "Retrieves dynamic information about a partition of an event hub (see <xref uid=\"com.microsoft.azure.eventhubs.PartitionRuntimeInformation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionRuntimeInformation\"></xref> for details. Retries until it reaches the operation timeout, then either rethrows the last error if available or returns null to indicate timeout."
returns:
description: "CompletableFuture which returns an PartitionRuntimeInformation on success, or null on timeout."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.PartitionRuntimeInformation?alt=com.microsoft.azure.eventhubs.PartitionRuntimeInformation&text=PartitionRuntimeInformation\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.getRuntimeInformation()"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.getRuntimeInformation()"
name: "getRuntimeInformation()"
nameWithType: "EventHubClient.getRuntimeInformation()"
summary: "Retrieves general information about an event hub (see <xref uid=\"com.microsoft.azure.eventhubs.EventHubRuntimeInformation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubRuntimeInformation\"></xref> for details)."
modifiers:
- "abstract"
syntax: "public abstract CompletableFuture<EventHubRuntimeInformation> getRuntimeInformation()"
desc: "Retrieves general information about an event hub (see <xref uid=\"com.microsoft.azure.eventhubs.EventHubRuntimeInformation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventHubRuntimeInformation\"></xref> for details). Retries until it reaches the operation timeout, then either rethrows the last error if available or returns null to indicate timeout."
returns:
description: "CompletableFuture which returns an EventHubRuntimeInformation on success, or null on timeout."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<xref href=\"com.microsoft.azure.eventhubs.EventHubRuntimeInformation?alt=com.microsoft.azure.eventhubs.EventHubRuntimeInformation&text=EventHubRuntimeInformation\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.send(EventData data)"
name: "send(EventData data)"
nameWithType: "EventHubClient.send(EventData data)"
summary: "Send <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to Event<wbr>Hub."
modifiers:
- "abstract"
parameters:
- description: "the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to be sent."
name: "data"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract CompletableFuture<Void> send(EventData data)"
desc: "Send <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to EventHub. The sent <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> will land on any arbitrarily chosen EventHubs partition.\n\nThere are 3 ways to send to EventHubs, each exposed as a method (along with its sendBatch overload):\n\n * <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref>, <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(Iterable)\"></xref>, or <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventDataBatch)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventDataBatch)\"></xref>\n * <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData, String)\"></xref> or <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(Iterable, String)\"></xref>\n * <xref uid=\"com.microsoft.azure.eventhubs.PartitionSender.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionSender#send(EventData)\"></xref>, <xref uid=\"com.microsoft.azure.eventhubs.PartitionSender.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionSender#send(Iterable)\"></xref>, or <xref uid=\"com.microsoft.azure.eventhubs.PartitionSender.send(com.microsoft.azure.eventhubs.EventDataBatch)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PartitionSender#send(EventDataBatch)\"></xref>\n\nUse this method to Send, if:\n\n```java\na) the send() operation should be highly available and\n b) the data needs to be evenly distributed among all partitions; exception being, when a subset of partitions are unavailable\n```\n\n<xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref> send's the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to a Service Gateway, which in-turn will forward the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to one of the EventHubs' partitions. Here's the message forwarding algorithm:\n\n```java\ni. Forward the 's to EventHub partitions, by equally distributing the data among all partitions (ex: Round-robin the 's to all EventHubs' partitions)\n ii. If one of the EventHub partitions is unavailable for a moment, the Service Gateway will automatically detect it and forward the message to another available partition - making the Send operation highly-available.\n```"
returns:
description: "a CompletableFuture that can be completed when the send operations is done.."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData,java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.send(EventData eventData, String partitionKey)"
name: "send(EventData eventData, String partitionKey)"
nameWithType: "EventHubClient.send(EventData eventData, String partitionKey)"
summary: "Send an '<xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> with a partition<wbr>Key' to Event<wbr>Hub."
modifiers:
- "abstract"
parameters:
- description: "the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to be sent."
name: "eventData"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />"
- description: "the partitionKey will be hash'ed to determine the partitionId to send the eventData to. On the Received message this can be accessed at <xref uid=\"com.microsoft.azure.eventhubs.EventData.SystemProperties.getPartitionKey()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData.SystemProperties#getPartitionKey()\"></xref>"
name: "partitionKey"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public abstract CompletableFuture<Void> send(EventData eventData, String partitionKey)"
desc: "Send an '<xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> with a partitionKey' to EventHub. All <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s with a partitionKey are guaranteed to land on the same partition. This send pattern emphasize data correlation over general availability and latency.\n\nThere are 3 ways to send to EventHubs, each exposed as a method (along with its sendBatch overload):\n\n```java\ni. or \n ii. or \n iii. or\n```\n\nUse this type of Send, if:\n\n```java\ni. There is a need for correlation of events based on Sender instance; The sender can generate a UniqueId and set it as partitionKey - which on the received Message can be used for correlation\n ii. The client wants to take control of distribution of data across partitions.\n```\n\nMultiple PartitionKey's could be mapped to one Partition. EventHubs service uses a proprietary Hash algorithm to map the PartitionKey to a PartitionId. Using this type of Send (Sending using a specific partitionKey), could sometimes result in partitions which are not evenly distributed."
returns:
description: "a CompletableFuture that can be completed when the send operations is done.."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventDataBatch)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.send(EventDataBatch eventDatas)"
name: "send(EventDataBatch eventDatas)"
nameWithType: "EventHubClient.send(EventDataBatch eventDatas)"
summary: "Send <xref uid=\"com.microsoft.azure.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> to Event<wbr>Hub."
modifiers:
- "abstract"
parameters:
- description: "EventDataBatch to send to EventHub"
name: "eventDatas"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventDataBatch?alt=com.microsoft.azure.eventhubs.EventDataBatch&text=EventDataBatch\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract CompletableFuture<Void> send(EventDataBatch eventDatas)"
desc: "Send <xref uid=\"com.microsoft.azure.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> to EventHub. The sent <xref uid=\"com.microsoft.azure.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref> will land according the partition key set in the <xref uid=\"com.microsoft.azure.eventhubs.EventDataBatch\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventDataBatch\"></xref>. If a partition key is not set, then we will Round-robin the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s to all EventHubs' partitions."
returns:
description: "a CompleteableFuture that can be completed when the send operations are done"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.send(Iterable<EventData> eventDatas)"
name: "send(Iterable<EventData> eventDatas)"
nameWithType: "EventHubClient.send(Iterable<EventData> eventDatas)"
summary: "Send a batch of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to Event<wbr>Hub."
modifiers:
- "abstract"
parameters:
- description: "batch of events to send to EventHub"
name: "eventDatas"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a><<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />>"
syntax: "public abstract CompletableFuture<Void> send(Iterable<EventData> eventDatas)"
desc: "Send a batch of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to EventHub. The sent <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> will land on any arbitrarily chosen EventHubs partition. This is the most recommended way to Send to EventHubs.\n\nThere are 3 ways to send to EventHubs, to understand this particular type of Send refer to the overload <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref>, which is used to send single <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>. Use this overload versus <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref>, if you need to send a batch of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>.\n\nSending a batch of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s is useful in the following cases:\n\n```java\ni. Efficient send - sending a batch of maximizes the overall throughput by optimally using the number of sessions created to EventHubs' service.\n ii. Send multiple 's in a Transaction. To achieve ACID properties, the Gateway Service will forward all 's in the batch to a single EventHubs' partition.\n```\n\nSample code (sample uses sync version of the api but concept are identical):\n\n```java\nGson gson = new GsonBuilder().create();\n EventHubClient client = EventHubClient.createSync(\"__connection__\");\n\n while (true)\n {\n LinkedList events = new LinkedList();}\n for (int count = 1; count < 11; count++)\n {\n PayloadEvent payload = new PayloadEvent(count);\n byte[] payloadBytes = gson.toJson(payload).getBytes(Charset.defaultCharset());\n EventData sendEvent = new EventData(payloadBytes);\n sendEvent.getProperties().put(\"from\", \"javaClient\");\n events.add(sendEvent);\n }\n\n client.sendSync(events);\n System.out.println(String.format(\"Sent Batch... Size: %s\", events.size()));\n }\n```\n\nfor Exceptions refer to <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.sendSync(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#sendSync(Iterable)\"></xref>"
returns:
description: "a CompletableFuture that can be completed when the send operations is done.."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>,java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.send(Iterable<EventData> eventDatas, String partitionKey)"
name: "send(Iterable<EventData> eventDatas, String partitionKey)"
nameWithType: "EventHubClient.send(Iterable<EventData> eventDatas, String partitionKey)"
summary: "Send a 'batch of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> with the same partition<wbr>Key' to Event<wbr>Hub."
modifiers:
- "abstract"
parameters:
- description: "the batch of events to send to EventHub"
name: "eventDatas"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a><<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />>"
- description: "the partitionKey will be hash'ed to determine the partitionId to send the eventData to. On the Received message this can be accessed at <xref uid=\"com.microsoft.azure.eventhubs.EventData.SystemProperties.getPartitionKey()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData.SystemProperties#getPartitionKey()\"></xref>"
name: "partitionKey"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public abstract CompletableFuture<Void> send(Iterable<EventData> eventDatas, String partitionKey)"
desc: "Send a 'batch of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> with the same partitionKey' to EventHub. All <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s with a partitionKey are guaranteed to land on the same partition. Multiple PartitionKey's will be mapped to one Partition.\n\nThere are 3 ways to send to EventHubs, to understand this particular type of Send refer to the overload <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData, String)\"></xref>, which is the same type of Send and is used to send single <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>.\n\nSending a batch of <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref>'s is useful in the following cases:\n\n```java\ni. Efficient send - sending a batch of maximizes the overall throughput by optimally using the number of sessions created to EventHubs service.\n ii. Send multiple events in One Transaction. This is the reason why all events sent in a batch needs to have same partitionKey (so that they are sent to one partition only).\n```"
returns:
description: "a CompletableFuture that can be completed when the send operations is done.."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(com.microsoft.azure.eventhubs.EventData)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(EventData data)"
name: "sendSync(EventData data)"
nameWithType: "EventHubClient.sendSync(EventData data)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref>."
modifiers:
- "default"
parameters:
- description: "the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to be sent."
name: "data"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />"
syntax: "public default void sendSync(EventData data)"
exceptions:
- description: "if the total size of the <xref uid=\"EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> exceeds a predefined limit set by the service. Default is 256k bytes."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData)\"></xref>."
- uid: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(com.microsoft.azure.eventhubs.EventData,java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(EventData eventData, String partitionKey)"
name: "sendSync(EventData eventData, String partitionKey)"
nameWithType: "EventHubClient.sendSync(EventData eventData, String partitionKey)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData, String)\"></xref>."
modifiers:
- "default"
parameters:
- description: "the <xref uid=\"com.microsoft.azure.eventhubs.EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> to be sent."
name: "eventData"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />"
- description: "the partitionKey will be hash'ed to determine the partitionId to send the eventData to. On the Received message this can be accessed at <xref uid=\"com.microsoft.azure.eventhubs.EventData.SystemProperties.getPartitionKey()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData.SystemProperties#getPartitionKey()\"></xref>"
name: "partitionKey"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public default void sendSync(EventData eventData, String partitionKey)"
exceptions:
- description: "if the total size of the <xref uid=\"EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> exceeds a pre-defined limit set by the service. Default is 256k bytes."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventData,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventData, String)\"></xref>."
- uid: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(com.microsoft.azure.eventhubs.EventDataBatch)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(EventDataBatch eventDatas)"
name: "sendSync(EventDataBatch eventDatas)"
nameWithType: "EventHubClient.sendSync(EventDataBatch eventDatas)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventDataBatch)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventDataBatch)\"></xref>."
modifiers:
- "default"
parameters:
- description: "EventDataBatch to send to EventHub"
name: "eventDatas"
type: "<xref href=\"com.microsoft.azure.eventhubs.EventDataBatch?alt=com.microsoft.azure.eventhubs.EventDataBatch&text=EventDataBatch\" data-throw-if-not-resolved=\"False\" />"
syntax: "public default void sendSync(EventDataBatch eventDatas)"
exceptions:
- description: "if Service Bus service encountered problems during the operation."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(com.microsoft.azure.eventhubs.EventDataBatch)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(EventDataBatch)\"></xref>."
- uid: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(Iterable<EventData> eventDatas)"
name: "sendSync(Iterable<EventData> eventDatas)"
nameWithType: "EventHubClient.sendSync(Iterable<EventData> eventDatas)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(Iterable)\"></xref>."
modifiers:
- "default"
parameters:
- description: "batch of events to send to EventHub"
name: "eventDatas"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a><<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />>"
syntax: "public default void sendSync(Iterable<EventData> eventDatas)"
exceptions:
- description: "if the total size of the <xref uid=\"EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> exceeds a pre-defined limit set by the service. Default is 256k bytes."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(Iterable)\"></xref>."
- uid: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>,java.lang.String)"
fullName: "com.microsoft.azure.eventhubs.EventHubClient.sendSync(Iterable<EventData> eventDatas, String partitionKey)"
name: "sendSync(Iterable<EventData> eventDatas, String partitionKey)"
nameWithType: "EventHubClient.sendSync(Iterable<EventData> eventDatas, String partitionKey)"
summary: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(Iterable, String)\"></xref>."
modifiers:
- "default"
parameters:
- description: "the batch of events to send to EventHub"
name: "eventDatas"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html\">Iterable</a><<xref href=\"com.microsoft.azure.eventhubs.EventData?alt=com.microsoft.azure.eventhubs.EventData&text=EventData\" data-throw-if-not-resolved=\"False\" />>"
- description: "the partitionKey will be hash'ed to determine the partitionId to send the eventData to. On the Received message this can be accessed at <xref uid=\"com.microsoft.azure.eventhubs.EventData.SystemProperties.getPartitionKey()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData.SystemProperties#getPartitionKey()\"></xref>"
name: "partitionKey"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public default void sendSync(Iterable<EventData> eventDatas, String partitionKey)"
exceptions:
- description: "if the total size of the <xref uid=\"EventData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EventData\"></xref> exceeds a pre-defined limit set by the service. Default is 256k bytes."
type: "<xref href=\"com.microsoft.azure.eventhubs.EventHubException?alt=com.microsoft.azure.eventhubs.EventHubException&text=EventHubException\" data-throw-if-not-resolved=\"False\" />"
desc: "Synchronous version of <xref uid=\"com.microsoft.azure.eventhubs.EventHubClient.send(java.lang.Iterable<com.microsoft.azure.eventhubs.EventData>,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#send(Iterable, String)\"></xref>."
type: "interface"
desc: "Anchor class - all EventHub client operations STARTS here."
metadata: {}
package: "com.microsoft.azure.eventhubs"
artifact: com.microsoft.azure:azure-eventhubs:3.2.2