Completed
Push — master ( 06100a...5419a5 )
by Anton
36s queued 19s
created

getQueueMessageCheckerPlugins()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
c 2
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Pyz\Zed\Queue;
9
10
use Spryker\Shared\AssetStorage\AssetStorageConfig;
11
use Spryker\Shared\AvailabilityStorage\AvailabilityStorageConfig;
12
use Spryker\Shared\AvailabilityStorage\AvailabilityStorageConstants;
13
use Spryker\Shared\CategoryPageSearch\CategoryPageSearchConstants;
14
use Spryker\Shared\CategoryStorage\CategoryStorageConstants;
15
use Spryker\Shared\CmsPageSearch\CmsPageSearchConstants;
16
use Spryker\Shared\CmsStorage\CmsStorageConstants;
17
use Spryker\Shared\CompanyUserStorage\CompanyUserStorageConfig;
18
use Spryker\Shared\Config\Config;
19
use Spryker\Shared\ConfigurableBundlePageSearch\ConfigurableBundlePageSearchConfig;
20
use Spryker\Shared\ConfigurableBundleStorage\ConfigurableBundleStorageConfig;
21
use Spryker\Shared\ContentStorage\ContentStorageConfig;
22
use Spryker\Shared\CustomerAccessStorage\CustomerAccessStorageConstants;
23
use Spryker\Shared\CustomerStorage\CustomerStorageConfig;
24
use Spryker\Shared\Event\EventConstants;
25
use Spryker\Shared\FileManagerStorage\FileManagerStorageConstants;
26
use Spryker\Shared\GlossaryStorage\GlossaryStorageConfig;
27
use Spryker\Shared\Log\LogConstants;
28
use Spryker\Shared\MerchantOpeningHoursStorage\MerchantOpeningHoursStorageConfig;
29
use Spryker\Shared\MerchantSearch\MerchantSearchConfig;
30
use Spryker\Shared\MerchantStorage\MerchantStorageConfig;
31
use Spryker\Shared\PriceProductOfferStorage\PriceProductOfferStorageConfig;
32
use Spryker\Shared\PriceProductStorage\PriceProductStorageConfig;
33
use Spryker\Shared\PriceProductStorage\PriceProductStorageConstants;
34
use Spryker\Shared\ProductConfigurationStorage\ProductConfigurationStorageConfig;
35
use Spryker\Shared\ProductImageStorage\ProductImageStorageConfig;
36
use Spryker\Shared\ProductOfferAvailabilityStorage\ProductOfferAvailabilityStorageConfig;
37
use Spryker\Shared\ProductOfferStorage\ProductOfferStorageConfig;
38
use Spryker\Shared\ProductPageSearch\ProductPageSearchConfig;
39
use Spryker\Shared\ProductPageSearch\ProductPageSearchConstants;
40
use Spryker\Shared\ProductStorage\ProductStorageConfig;
41
use Spryker\Shared\ProductStorage\ProductStorageConstants;
42
use Spryker\Shared\PublishAndSynchronizeHealthCheck\PublishAndSynchronizeHealthCheckConfig;
43
use Spryker\Shared\PublishAndSynchronizeHealthCheckSearch\PublishAndSynchronizeHealthCheckSearchConfig;
44
use Spryker\Shared\PublishAndSynchronizeHealthCheckStorage\PublishAndSynchronizeHealthCheckStorageConfig;
45
use Spryker\Shared\Publisher\PublisherConfig;
46
use Spryker\Shared\SalesReturnSearch\SalesReturnSearchConfig;
47
use Spryker\Shared\SearchHttp\SearchHttpConfig;
48
use Spryker\Shared\ShoppingListStorage\ShoppingListStorageConfig;
49
use Spryker\Shared\StoreStorage\StoreStorageConfig;
50
use Spryker\Shared\TaxProductStorage\TaxProductStorageConfig;
51
use Spryker\Shared\TaxStorage\TaxStorageConfig;
52
use Spryker\Shared\UrlStorage\UrlStorageConfig;
53
use Spryker\Shared\UrlStorage\UrlStorageConstants;
54
use Spryker\Zed\Event\Communication\Plugin\Queue\EventQueueMessageProcessorPlugin;
55
use Spryker\Zed\Event\Communication\Plugin\Queue\EventRetryQueueMessageProcessorPlugin;
56
use Spryker\Zed\Kernel\Container;
57
use Spryker\Zed\Queue\QueueDependencyProvider as SprykerDependencyProvider;
58
use Spryker\Zed\RabbitMq\Communication\Plugin\Queue\RabbitMqQueueMessageCheckerPlugin;
59
use Spryker\Zed\Synchronization\Communication\Plugin\Queue\SynchronizationSearchQueueMessageProcessorPlugin;
60
use Spryker\Zed\Synchronization\Communication\Plugin\Queue\SynchronizationStorageQueueMessageProcessorPlugin;
61
use SprykerEco\Zed\Loggly\Communication\Plugin\LogglyLoggerQueueMessageProcessorPlugin;
62
63
class QueueDependencyProvider extends SprykerDependencyProvider
64
{
65
    /**
66
     * @param \Spryker\Zed\Kernel\Container $container
67
     *
68
     * @return array<\Spryker\Zed\Queue\Dependency\Plugin\QueueMessageProcessorPluginInterface>
69
     */
70
    protected function getProcessorMessagePlugins(Container $container): array
71
    {
72
        return [
73
            EventConstants::EVENT_QUEUE => new EventQueueMessageProcessorPlugin(),
74
            EventConstants::EVENT_QUEUE_RETRY => new EventRetryQueueMessageProcessorPlugin(),
75
            PublisherConfig::PUBLISH_QUEUE => new EventQueueMessageProcessorPlugin(),
76
            PublisherConfig::PUBLISH_RETRY_QUEUE => new EventRetryQueueMessageProcessorPlugin(),
77
            GlossaryStorageConfig::PUBLISH_TRANSLATION => new EventQueueMessageProcessorPlugin(),
78
            Config::get(LogConstants::LOG_QUEUE_NAME) => new LogglyLoggerQueueMessageProcessorPlugin(),
79
            GlossaryStorageConfig::SYNC_STORAGE_TRANSLATION => new SynchronizationStorageQueueMessageProcessorPlugin(),
80
            CmsStorageConstants::CMS_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
81
            AvailabilityStorageConfig::PUBLISH_AVAILABILITY => new EventQueueMessageProcessorPlugin(),
82
            AvailabilityStorageConstants::AVAILABILITY_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
83
            CustomerAccessStorageConstants::CUSTOMER_ACCESS_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
84
            CustomerStorageConfig::PUBLISH_CUSTOMER_INVALIDATED => new EventQueueMessageProcessorPlugin(),
85
            CustomerStorageConfig::CUSTOMER_INVALIDATED_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
86
            PublishAndSynchronizeHealthCheckConfig::PUBLISH_PUBLISH_AND_SYNCHRONIZE_HEALTH_CHECK => new EventQueueMessageProcessorPlugin(),
87
            PublishAndSynchronizeHealthCheckStorageConfig::SYNC_STORAGE_PUBLISH_AND_SYNCHRONIZE_HEALTH_CHECK => new SynchronizationStorageQueueMessageProcessorPlugin(),
88
            PublishAndSynchronizeHealthCheckSearchConfig::SYNC_SEARCH_PUBLISH_AND_SYNCHRONIZE_HEALTH_CHECK => new SynchronizationSearchQueueMessageProcessorPlugin(),
89
            UrlStorageConfig::PUBLISH_URL => new EventQueueMessageProcessorPlugin(),
90
            UrlStorageConstants::URL_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
91
            ProductStorageConfig::PUBLISH_PRODUCT_ABSTRACT => new EventQueueMessageProcessorPlugin(),
92
            ProductStorageConfig::PUBLISH_PRODUCT_CONCRETE => new EventQueueMessageProcessorPlugin(),
93
            ProductStorageConstants::PRODUCT_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
94
            ConfigurableBundleStorageConfig::CONFIGURABLE_BUNDLE_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
95
            ConfigurableBundlePageSearchConfig::CONFIGURABLE_BUNDLE_SEARCH_QUEUE => new SynchronizationSearchQueueMessageProcessorPlugin(),
96
            PriceProductStorageConfig::PUBLISH_PRICE_PRODUCT_ABSTRACT => new EventQueueMessageProcessorPlugin(),
97
            PriceProductStorageConfig::PUBLISH_PRICE_PRODUCT_CONCRETE => new EventQueueMessageProcessorPlugin(),
98
            ProductImageStorageConfig::PUBLISH_PRODUCT_ABSTRACT_IMAGE => new EventQueueMessageProcessorPlugin(),
99
            ProductImageStorageConfig::PUBLISH_PRODUCT_CONCRETE_IMAGE => new EventQueueMessageProcessorPlugin(),
100
            PriceProductStorageConstants::PRICE_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
101
            CategoryStorageConstants::CATEGORY_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
102
            CmsPageSearchConstants::CMS_SYNC_SEARCH_QUEUE => new SynchronizationSearchQueueMessageProcessorPlugin(),
103
            CategoryPageSearchConstants::CATEGORY_SYNC_SEARCH_QUEUE => new SynchronizationSearchQueueMessageProcessorPlugin(),
104
            ProductPageSearchConfig::PUBLISH_PRODUCT_ABSTRACT_PAGE => new EventQueueMessageProcessorPlugin(),
105
            ProductPageSearchConfig::PUBLISH_PRODUCT_CONCRETE_PAGE => new EventQueueMessageProcessorPlugin(),
106
            ProductPageSearchConstants::PRODUCT_SYNC_SEARCH_QUEUE => new SynchronizationSearchQueueMessageProcessorPlugin(),
107
            FileManagerStorageConstants::FILE_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
108
            ShoppingListStorageConfig::SHOPPING_LIST_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
109
            CompanyUserStorageConfig::COMPANY_USER_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
110
            ContentStorageConfig::CONTENT_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
111
            TaxProductStorageConfig::PRODUCT_ABSTRACT_TAX_SET_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
112
            TaxStorageConfig::TAX_SET_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
113
            SalesReturnSearchConfig::SYNC_SEARCH_RETURN => new SynchronizationSearchQueueMessageProcessorPlugin(),
114
            MerchantStorageConfig::MERCHANT_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
115
            MerchantSearchConfig::SYNC_SEARCH_MERCHANT => new SynchronizationSearchQueueMessageProcessorPlugin(),
116
            StoreStorageConfig::STORE_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
117
            PriceProductOfferStorageConfig::PRICE_PRODUCT_OFFER_OFFER_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
118
            MerchantOpeningHoursStorageConfig::MERCHANT_OPENING_HOURS_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
119
            ProductOfferAvailabilityStorageConfig::PRODUCT_OFFER_AVAILABILITY_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
120
            ProductOfferStorageConfig::PRODUCT_OFFER_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
121
            AssetStorageConfig::ASSET_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
122
            ProductConfigurationStorageConfig::PRODUCT_CONFIGURATION_SYNC_STORAGE_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
123
            SearchHttpConfig::SEARCH_HTTP_CONFIG_SYNC_QUEUE => new SynchronizationStorageQueueMessageProcessorPlugin(),
124
        ];
125
    }
126
127
    /**
128
     * @return array<\Spryker\Zed\QueueExtension\Dependency\Plugin\QueueMessageCheckerPluginInterface>
129
     */
130
    protected function getQueueMessageCheckerPlugins(): array
131
    {
132
        return array_merge(
133
            parent::getQueueMessageCheckerPlugins(),
134
            [
135
                new RabbitMqQueueMessageCheckerPlugin(),
136
            ],
137
        );
138
    }
139
}
140