Package: io.vertx.groovy.servicediscovery.types

## [Groovy] Class MessageSource

- io.vertx.groovy.servicediscovery.types.MessageSource

- Service type for data producer. Providers are publishing data to a specific event bus address.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `MessageSource (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static java.util.Map<java.lang.String, java.lang.Object>` | `createRecord(java.lang.String name, java.lang.String address, java.lang.String type, java.util.Map<java.lang.String, java.lang.Object> metadata)` Create a record representing a data producer.
    `static java.util.Map<java.lang.String, java.lang.Object>` | `createRecord(java.lang.String name, java.lang.String address, java.lang.String type)` Same as MessageSource.createRecord without additional metadata.
    `static java.util.Map<java.lang.String, java.lang.Object>` | `createRecord(java.lang.String name, java.lang.String address)` Same as MessageSource.createRecord without additional metadata, and no type for the payload.
    `static void` | `getConsumer(ServiceDiscovery discovery, java.util.Map<java.lang.String, java.lang.Object> filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<MessageConsumer<T>>> resultHandler)` Convenient method that looks for a message source and provides the configured .
    `java.lang.Object` | `getDelegate()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### MessageSource(java.lang.Object delegate)

  - ### Method Detail

    - #### static java.util.Map<java.lang.String, java.lang.Object> createRecord(java.lang.String name, java.lang.String address, java.lang.String type, java.util.Map<java.lang.String, java.lang.Object> metadata)

      Create a record representing a data producer.

      Returns:
        the created record (see Record)
      Parameters:
        `name` - the name of the service
        `address` - the address on which the data is sent
        `type` - the type of payload (fully qualified name of the class)
        `metadata` - additional metadata

    - #### static java.util.Map<java.lang.String, java.lang.Object> createRecord(java.lang.String name, java.lang.String address, java.lang.String type)

      Same as MessageSource.createRecord without additional metadata.

      Returns:
        the created record (see Record)
      Parameters:
        `name` - the name of the service
        `address` - the address on which the data is sent
        `type` - the type of payload

    - #### static java.util.Map<java.lang.String, java.lang.Object> createRecord(java.lang.String name, java.lang.String address)

      Same as MessageSource.createRecord without additional metadata, and no type for the payload.

      Returns:
        the created record (see Record)
      Parameters:
        `name` - the name of the service
        `address` - the address on which the data is sent.

    - #### static void getConsumer(ServiceDiscovery discovery, java.util.Map<java.lang.String, java.lang.Object> filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<MessageConsumer<T>>> resultHandler)

      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

    - #### java.lang.Object getDelegate()