maritechpro/rpc-amqp-client

RPC client bundle

1.0.0 2020-12-14 14:59 UTC

This package is auto-updated.

Last update: 2022-11-14 20:10:14 UTC


README

Configure services for this bundle in your project as in example:

services:
  GepurIt\RemoteProcedureCallBundle\Rabbit\ExchangeProviderInterface:
    alias: 'rpc.provider.your_service_1'

  GepurIt\RemoteProcedureCallBundle\RpcClient\RpcClientInterface:
    alias: 'rpc.your_service_1'

# 1 -- default
  rpc.provider.your_service_1:
    class: GepurIt\RemoteProcedureCallBundle\Rabbit\ExchangeProvider
    arguments: ['@rabbit_mq_service_1', 'your_queue_1']
    public: true

  rpc.your_service_1:
    class: GepurIt\RemoteProcedureCallBundle\RpcClient\RemoteProcedureCallClient
    autowire: true
    arguments:
      $exchangeProvider: 'rpc.provider.your_service_1'
    public: true

# 2
  rpc.provider.your_service_2:
    class: GepurIt\RemoteProcedureCallBundle\Rabbit\ExchangeProvider
    arguments: ['@rabbit_mq_service_2', 'your_queue_2']
    public: true

  rpc.your_service_2:
    class: GepurIt\RemoteProcedureCallBundle\RpcClient\RemoteProcedureCallClient
    autowire: true
    arguments:
      $exchangeProvider: 'rpc.provider.your_service_2'
    public: true