ConfigInterface.php 929 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\MessageQueue\Consumer;
  7. use Magento\Framework\Exception\LocalizedException;
  8. use Magento\Framework\MessageQueue\Consumer\Config\ConsumerConfigItemInterface;
  9. /**
  10. * Consumer config interface provides access data declared in etc/queue_consumer.xml
  11. *
  12. * @api
  13. * @since 102.0.1
  14. */
  15. interface ConfigInterface
  16. {
  17. /**
  18. * Get consumer configuration by consumer name.
  19. *
  20. * @param string $name
  21. * @return ConsumerConfigItemInterface
  22. * @throws LocalizedException
  23. * @throws \LogicException
  24. * @since 102.0.1
  25. */
  26. public function getConsumer($name);
  27. /**
  28. * Get list of all consumers declared in the system.
  29. *
  30. * @return ConsumerConfigItemInterface[]
  31. * @throws \LogicException
  32. * @since 102.0.1
  33. */
  34. public function getConsumers();
  35. }