ConsumerConfigItemInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\MessageQueue\Consumer\Config;
  7. use Magento\Framework\MessageQueue\Consumer\Config\ConsumerConfigItem\HandlerInterface;
  8. /**
  9. * Items of this class represent config items declared in etc/queue_consumer.xsd
  10. */
  11. interface ConsumerConfigItemInterface
  12. {
  13. /**
  14. * Get consumer name.
  15. *
  16. * @return string
  17. */
  18. public function getName();
  19. /**
  20. * Get connection name.
  21. *
  22. * @return string
  23. */
  24. public function getConnection();
  25. /**
  26. * Get name of the queue current consumer is listening to.
  27. *
  28. * @return string
  29. */
  30. public function getQueue();
  31. /**
  32. * Get consumer class name.
  33. *
  34. * @return string
  35. */
  36. public function getConsumerInstance();
  37. /**
  38. * Get information about custom handlers to be used by current consumer.
  39. *
  40. * @return HandlerInterface[]
  41. */
  42. public function getHandlers();
  43. /**
  44. * Get maximum number of messages to be consumed from queue before terminating consumer.
  45. *
  46. * @return int
  47. */
  48. public function getMaxMessages();
  49. }