{"record":{"id":"a4c6ec3d56be2636","repo":"phalcon/cphalcon","slug":"this-transport-can-only-action-a-queue-destinati","errorCode":null,"errorMessage":"This transport can only {action} a Queue destination","messagePattern":"This transport can only (.+?) a Queue destination","errorType":"exception","errorClass":"Phalcon\\Queue\\Exceptions\\InvalidDestinationException","httpStatus":null,"severity":"error","filePath":"phalcon/Queue/Adapter/QueueDestinationGuard.zep","lineNumber":42,"sourceCode":"use Phalcon\\Queue\\Exceptions\\InvalidDestinationException;\n\n/**\n * Shared \"destination must be a queue\" guard. Producers (on send) and contexts\n * (on createConsumer) both reject any non-queue destination with the same typed\n * exception; this keeps that single rule in one place. The `action` verb\n * (\"send to\", \"consume from\") tailors the message to the caller.\n */\nclass QueueDestinationGuard\n{\n    /**\n     * Throws InvalidDestinationException unless the destination is a queue.\n     *\n     * @phpstan-assert QueueInterface $destination\n     */\n    public static function assertQueue(<DestinationInterface> destination, string action) -> void\n    {\n        if unlikely !(destination instanceof QueueInterface) {\n            throw new InvalidDestinationException(action);\n        }\n    }\n}\n","sourceCodeStart":24,"sourceCodeEnd":46,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Queue/Adapter/QueueDestinationGuard.zep#L24-L46","documentation":"Shared guard (QueueDestinationGuard::assertQueue) that rejects a destination which is not a Queue implementation. Both producers (on send) and consumer contexts (on createConsumer) route through it; the '{action}' placeholder is filled with 'send to' or 'consume from'. The at-fault input is any DestinationInterface object that is not a QueueInterface (e.g. a topic destination passed to a queue-only transport).","triggerScenarios":"Thrown at phalcon/Queue/Adapter/QueueDestinationGuard.zep:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a QueueInterface destination (e.g. a plain queue name or Queue destination object) instead of a topic/other destination type","Use a transport that supports the destination type you actually need (e.g. a topic-capable transport for topics)","Check that the destination object is created by the correct factory for this transport"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","contentChangedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}