CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C Queue 2.x API

  • Project:
    • Queue
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 2.x
      • 2.x
      • 1.x

Namespaces

  • Cake\Queue
    • Command
    • Consumption
    • Job
    • Listener
    • Mailer
    • Model
    • Queue
    • TestSuite
      • Constraint
      • Transport

Class TestSubscriptionConsumer

Test Subscription Consumer

Minimal subscription consumer implementation for testing.

Namespace: Cake\Queue\TestSuite\Transport

Method Summary

  • consume() public

    Consume

  • subscribe() public

    Subscribe

  • unsubscribe() public

    Unsubscribe

  • unsubscribeAll() public

    Unsubscribe all

Method Detail

consume() ¶ public

consume(int $timeout = 0): void

Consume

Parameters
int $timeout optional

Timeout in milliseconds

Returns
void

subscribe() ¶ public

subscribe(Consumer $consumer, callable $callback): void

Subscribe

A callback function to which the consumed message will be passed. The function must accept at a minimum one parameter, an \Interop\Queue\Message object, and an optional second parameter the \Interop\Queue\Consumer from which the message was consumed. The consumer will not return the processing thread back to the PHP script until the callback function returns FALSE.

Parameters
Consumer $consumer

Consumer

callable $callback

Callback

Returns
void

unsubscribe() ¶ public

unsubscribe(Consumer $consumer): void

Unsubscribe

Parameters
Consumer $consumer

Consumer

Returns
void

unsubscribeAll() ¶ public

unsubscribeAll(): void

Unsubscribe all

Returns
void
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs