We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Message-Queue Client actually needs a bit complicated initialisation process:
// load the application name $applicationName = $this->getApplication()->getName(); // initialize the connection and the session $queue = MessageQueue::createQueue('pms/importChunk'); $connection = QueueConnectionFactory::createQueueConnection($applicationName); $session = $connection->createQueueSession(); $sender = $session->createSender($queue);
UAC:
The text was updated successfully, but these errors were encountered:
Queue-Sender instances can not be injected like Managers
class MyServlet extends HttpServlet /** * The queue session to send a message with. * * @var \AppserverIo\MessageQueueClient\QueueSession * @Resource(name="pms/createASingleActionTimer") */ protected $queueSender; /** * Handles a HTTP POST request. * * @param \AppserverIo\Psr\Servlet\Http\HttpServletRequest $servletRequest The request instance * @param \AppserverIo\Psr\Servlet\Http\HttpServletResponse $servletResponse The response instance * * @return void * @throws \AppserverIo\Psr\Servlet\ServletException Is thrown if the request method is not implemented * @see \AppserverIo\Psr\Servlet\Http\HttpServlet::doGet() */ public function doPost(HttpServletRequest $servletRequest, HttpServletResponse $servletResponse) { $this->queueSender->send(new IntegerMessage($this->duration)); } }
Sorry, something went wrong.
wagnert
No branches or pull requests
The Message-Queue Client actually needs a bit complicated initialisation process:
UAC:
The text was updated successfully, but these errors were encountered: