Comments (3)
Hi @artandor!
Ok, so the problem is that you're setting the routingKey
in the TransportConfiguration
when you're sending one of your messages. This ultimately cases $message->setRoutingKey()
to be called. But, when you switch to the null transport, you are switching to the NullMessage()
, which does not have a setRoutingKey()
method on it. It's tricky: I totally understand what you're trying to do. On the other hand, the library is kind of correct to say: "Hey! You're trying to use an option on your message that is not supported by this transport!".
I'm open to suggestions!
from messenger-enqueue-transport.
I guess the AMQP transport configuration lacks of abstraction, which ultimately lead to having a "setRoutingKey" method that is too specific too some transports. It is indeed not really linked to the NullMessage itself. But in the end, the NullMessage becomes buggy when it comes to functionnal testing, which, according to the documentation, was one of its usage.
The simpliest fix could be to add a "dispatch: boolean" in the enqueue conf, that hooks into the dispatch process to stop it before connecting to the amqp server. This way we could use the same DSN instead of enqueue://null and we wouldn't need to bring back the broker online.
from messenger-enqueue-transport.
The simpliest fix could be to add a "dispatch: boolean" in the enqueue conf, that hooks into the dispatch process to stop it before connecting to the amqp server.
That's an interesting idea. Is that something that's supported in Enqueue in general already? Or are you just thinking out loud. It occurred to me that this is not a problem specific to this library - but Enqueue in general: if you are using the Amqp transport and calling custom setter methods on the AmqpMessage
, then if you globally switch to the NullTransport
for testing, it would also explode in a very similar way. The best path may be to find out how this is recommended to be handled in Enqueue in general, and then make sure this library is properly supporting that option.
Cheers!
from messenger-enqueue-transport.
Related Issues (20)
- [Symfony][4.3] Multienviroment support
- Argument 1 passed to Enqueue\Doctrine\DoctrineConnectionFactoryFactory::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Doctrine\Bundle\DoctrineBundle\Registry given, called in Container8oM08ig/App_KernelDevDebugContainer.php on line 1027 HOT 2
- How to set serializer on context HOT 5
- Consumption extensions
- Update dependencies for Support Symfony 6.0 HOT 2
- The "failed" receiver does not support listing or showing specific messages
- GPS 'authCache'
- [ActiveMQ][STOMP] Every second message skipped HOT 1
- Option to send to queue when used as `framework:sender` HOT 1
- Consuming multiple Kafka topics
- Add flush($timeout) method optional call for sending messages through Enqueue\RdKafka to make it sync
- [Symfony][4.3]RejectMessageException gets requeued
- Enqueue\MessengerAdapter\QueueInteropTransport internal OptionsResolver failure since 'transport_name' introduction HOT 6
- [Symfony][4.3] MessageBusProcessor
- Symfony framework bundle incompatibility (version >= 4.3.3) HOT 3
- QueueInteropTransport with RabbitMQ and Symfony Serializer does not send stamps
- It's not possible to pass consumer specific options from DSN HOT 6
- Message is not rejected when serializer throws MessageDecodingFailedException
- Communication channels for kafka-related topics
- RdKafkaConsumer subscribes to queue name instead of topic name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from messenger-enqueue-transport.