Skip to main content

getProducersAndConsumersForMessage

Callable

  • getProducersAndConsumersForMessage(directory: string): (id: string, version?: string, options?: { latestOnly?: boolean }) => Promise<{ consumers: Service[]; producers: Service[] }>

  • Returns the producers and consumers (services) for a given message.

    @example
    import utils from '@eventcatalog/utils';

    const { getProducersAndConsumersForMessage } = utils('/path/to/eventcatalog');

    // Returns the producers and consumers (services) for a given message
    const { producers, consumers } = await getProducersAndConsumersForMessage('InventoryAdjusted', '0.0.1');