@@ -37,31 +37,11 @@ class MassConsumer implements ConsumerInterface
37
37
*/
38
38
private $ invoker ;
39
39
40
- /**
41
- * @var \Magento\Framework\App\ResourceConnection
42
- */
43
- private $ resource ;
44
-
45
40
/**
46
41
* @var \Magento\Framework\MessageQueue\ConsumerConfigurationInterface
47
42
*/
48
43
private $ configuration ;
49
44
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
-
65
45
/**
66
46
* @var Registry
67
47
*/
@@ -75,32 +55,18 @@ class MassConsumer implements ConsumerInterface
75
55
* Initialize dependencies.
76
56
*
77
57
* @param CallbackInvokerInterface $invoker
78
- * @param ResourceConnection $resource
79
- * @param MessageController $messageController
80
58
* @param ConsumerConfigurationInterface $configuration
81
- * @param OperationProcessorFactory $operationProcessorFactory
82
- * @param LoggerInterface $logger
83
59
* @param MassConsumerEnvelopeCallbackFactory $massConsumerEnvelopeCallback
84
60
* @param Registry $registry
85
61
*/
86
62
public function __construct (
87
63
CallbackInvokerInterface $ invoker ,
88
- ResourceConnection $ resource ,
89
- MessageController $ messageController ,
90
64
ConsumerConfigurationInterface $ configuration ,
91
- OperationProcessorFactory $ operationProcessorFactory ,
92
- LoggerInterface $ logger ,
93
65
MassConsumerEnvelopeCallbackFactory $ massConsumerEnvelopeCallback ,
94
66
Registry $ registry = null
95
67
) {
96
68
$ this ->invoker = $ invoker ;
97
- $ this ->resource = $ resource ;
98
- $ this ->messageController = $ messageController ;
99
69
$ this ->configuration = $ configuration ;
100
- $ this ->operationProcessor = $ operationProcessorFactory ->create ([
101
- 'configuration ' => $ configuration
102
- ]);
103
- $ this ->logger = $ logger ;
104
70
$ this ->massConsumerEnvelopeCallback = $ massConsumerEnvelopeCallback ;
105
71
$ this ->registry = $ registry ?? \Magento \Framework \App \ObjectManager::getInstance ()
106
72
->get (Registry::class);
@@ -133,12 +99,7 @@ public function process($maxNumberOfMessages = null)
133
99
private function getTransactionCallback (QueueInterface $ queue )
134
100
{
135
101
$ callbackInstance = $ this ->massConsumerEnvelopeCallback ->create ([
136
- 'resource ' => $ this ->resource ,
137
- 'messageController ' => $ this ->messageController ,
138
102
'configuration ' => $ this ->configuration ,
139
- 'operationProcessor ' => $ this ->operationProcessor ,
140
- 'logger ' => $ this ->logger ,
141
- 'registry ' => $ this ->registry ,
142
103
'queue ' => $ queue ,
143
104
]);
144
105
return function (EnvelopeInterface $ message ) use ($ callbackInstance ) {
0 commit comments