Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
III-1466: Add extra code to make amqp publisher bodyFactory return th…
Browse files Browse the repository at this point in the history
…e payload only instead of whole domain message
  • Loading branch information
nleroy committed Sep 27, 2016
1 parent 8b65a82 commit 621b4c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use CultuurNet\BroadwayAMQP\AMQPPublisher;
use CultuurNet\BroadwayAMQP\DomainMessageJSONDeserializer;
use CultuurNet\BroadwayAMQP\EventBusForwardingConsumerFactory;
use CultuurNet\BroadwayAMQP\Message\Body\BodyFactoryInterface;
use CultuurNet\BroadwayAMQP\Message\Body\PayloadOnlyBodyFactory;
use CultuurNet\Deserializer\SimpleDeserializerLocator;
use CultuurNet\Geocoding\CachedGeocodingService;
use CultuurNet\Geocoding\DefaultGeocodingService;
Expand Down Expand Up @@ -459,6 +461,10 @@ function (Application $app) {
]
);

$app->extend('amqp.publisher.body_factory', function (BodyFactoryInterface $originalBodyFactory) {
return new PayloadOnlyBodyFactory();
});

$app->extend(
'amqp.publisher',
function (AMQPPublisher $amqpPublisher, Application $app) {
Expand Down

0 comments on commit 621b4c0

Please sign in to comment.