phalcon/cphalcon · error · Phalcon\Queue\Exceptions\InvalidDestinationException
This transport can only
Error message
This transport can only {action} a Queue destination What it means
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).
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at phalcon/Queue/Adapter/QueueDestinationGuard.zep:42 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/a4c6ec3d56be2636.
Report an issue: GitHub.
Appendix: source
Thrown at phalcon/Queue/Adapter/QueueDestinationGuard.zep:42
use Phalcon\Queue\Exceptions\InvalidDestinationException;
/**
* Shared "destination must be a queue" guard. Producers (on send) and contexts
* (on createConsumer) both reject any non-queue destination with the same typed
* exception; this keeps that single rule in one place. The `action` verb
* ("send to", "consume from") tailors the message to the caller.
*/
class QueueDestinationGuard
{
/**
* Throws InvalidDestinationException unless the destination is a queue.
*
* @phpstan-assert QueueInterface $destination
*/
public static function assertQueue(<DestinationInterface> destination, string action) -> void
{
if unlikely !(destination instanceof QueueInterface) {
throw new InvalidDestinationException(action);
}
}
}
View on GitHub (pinned to b7419de9cd)