Don't ack on send
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.4",
|
"php": ">=7.4",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"nsq/nsq": "0.2",
|
"nsq/nsq": "0.3",
|
||||||
"symfony/framework-bundle": "^5.0",
|
"symfony/framework-bundle": "^5.0",
|
||||||
"symfony/messenger": "^5.0"
|
"symfony/messenger": "^5.0"
|
||||||
},
|
},
|
||||||
|
@@ -53,16 +53,10 @@ final class NsqTransport implements TransportInterface
|
|||||||
*/
|
*/
|
||||||
public function send(Envelope $envelope): Envelope
|
public function send(Envelope $envelope): Envelope
|
||||||
{
|
{
|
||||||
$nsqEnvelope = $this->getNsqEnvelope($envelope);
|
|
||||||
|
|
||||||
$encodedMessage = $this->serializer->encode($envelope->withoutAll(NsqReceivedStamp::class));
|
$encodedMessage = $this->serializer->encode($envelope->withoutAll(NsqReceivedStamp::class));
|
||||||
|
|
||||||
$this->writer->pub($this->topic, json_encode($encodedMessage, JSON_THROW_ON_ERROR));
|
$this->writer->pub($this->topic, json_encode($encodedMessage, JSON_THROW_ON_ERROR));
|
||||||
|
|
||||||
if (null !== $nsqEnvelope) {
|
|
||||||
$nsqEnvelope->finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $envelope;
|
return $envelope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user