vertx / io.vertx.kotlin.servicediscovery.types / MessageSource / getConsumerAwait

# getConsumerAwait

`suspend fun <T> getConsumerAwait(discovery: ServiceDiscovery, filter: JsonObject): MessageConsumer<T>`

Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

### Parameters

`discovery` - The service discovery instance

`filter` - The filter, optional

`resultHandler` - The result handler

`suspend fun <T> getConsumerAwait(discovery: ServiceDiscovery, filter: Function<Record, Boolean>): MessageConsumer<T>`

Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

### Parameters

`discovery` - The service discovery instance

`filter` - The filter, must not be null

`resultHandler` - The result handler