@@ -37,31 +37,11 @@ class MassConsumer implements ConsumerInterface
3737 */
3838 private $ invoker ;
3939
40- /**
41- * @var \Magento\Framework\App\ResourceConnection
42- */
43- private $ resource ;
44-
4540 /**
4641 * @var \Magento\Framework\MessageQueue\ConsumerConfigurationInterface
4742 */
4843 private $ configuration ;
4944
50- /**
51- * @var \Magento\Framework\MessageQueue\MessageController
52- */
53- private $ messageController ;
54-
55- /**
56- * @var LoggerInterface
57- */
58- private $ logger ;
59-
60- /**
61- * @var OperationProcessor
62- */
63- private $ operationProcessor ;
64-
6545 /**
6646 * @var Registry
6747 */
@@ -75,32 +55,18 @@ class MassConsumer implements ConsumerInterface
7555 * Initialize dependencies.
7656 *
7757 * @param CallbackInvokerInterface $invoker
78- * @param ResourceConnection $resource
79- * @param MessageController $messageController
8058 * @param ConsumerConfigurationInterface $configuration
81- * @param OperationProcessorFactory $operationProcessorFactory
82- * @param LoggerInterface $logger
8359 * @param MassConsumerEnvelopeCallbackFactory $massConsumerEnvelopeCallback
8460 * @param Registry $registry
8561 */
8662 public function __construct (
8763 CallbackInvokerInterface $ invoker ,
88- ResourceConnection $ resource ,
89- MessageController $ messageController ,
9064 ConsumerConfigurationInterface $ configuration ,
91- OperationProcessorFactory $ operationProcessorFactory ,
92- LoggerInterface $ logger ,
9365 MassConsumerEnvelopeCallbackFactory $ massConsumerEnvelopeCallback ,
9466 Registry $ registry = null
9567 ) {
9668 $ this ->invoker = $ invoker ;
97- $ this ->resource = $ resource ;
98- $ this ->messageController = $ messageController ;
9969 $ this ->configuration = $ configuration ;
100- $ this ->operationProcessor = $ operationProcessorFactory ->create ([
101- 'configuration ' => $ configuration
102- ]);
103- $ this ->logger = $ logger ;
10470 $ this ->massConsumerEnvelopeCallback = $ massConsumerEnvelopeCallback ;
10571 $ this ->registry = $ registry ?? \Magento \Framework \App \ObjectManager::getInstance ()
10672 ->get (Registry::class);
@@ -133,12 +99,7 @@ public function process($maxNumberOfMessages = null)
13399 private function getTransactionCallback (QueueInterface $ queue )
134100 {
135101 $ callbackInstance = $ this ->massConsumerEnvelopeCallback ->create ([
136- 'resource ' => $ this ->resource ,
137- 'messageController ' => $ this ->messageController ,
138102 'configuration ' => $ this ->configuration ,
139- 'operationProcessor ' => $ this ->operationProcessor ,
140- 'logger ' => $ this ->logger ,
141- 'registry ' => $ this ->registry ,
142103 'queue ' => $ queue ,
143104 ]);
144105 return function (EnvelopeInterface $ message ) use ($ callbackInstance ) {
0 commit comments