SALES: 1-800-867-1380

NamespaceManager.CreateConsumerGroupIfNotExists Method (String, String)

Creates a consumer group if it does not already exist, using the specified Event Hubs path and group name. If the group already exists, then return the stored ConsumerGroupDescription.

Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public ConsumerGroupDescription CreateConsumerGroupIfNotExists(
	string eventHubPath,
	string name
)

Parameters

eventHubPath
Type: System.String
Path to the Event Hub.
name
Type: System.String
The name of the consumer group to create.

Return Value

Type: Microsoft.ServiceBus.Messaging.ConsumerGroupDescription
Returns the newly-created ConsumerGroupDescription. If the consumer group already exists, returns the existing ConsumerGroupDescription.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft