Skip to content

Instantly share code, notes, and snippets.

@dylanz
Created March 6, 2018 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanz/dceb17aac54282e92a12c61df9e50fc5 to your computer and use it in GitHub Desktop.
Save dylanz/dceb17aac54282e92a12c61df9e50fc5 to your computer and use it in GitHub Desktop.
<?php
$ironmq = new \IronMQ\IronMQ(array("token" => 'xxxx',"project_id" => 'xxxx'));
$queue_name = "my-handy-push-queue";
$params = array(
"type" => "multicast",
"push" => array(
"subscribers" => array(
array("some-url" => "https://example.com/accept/notification/here", "name" => "http-subscriber"),
array("worker-url" => "ironworker://my-project:xxxxx@xxxxx/process-data", "name" => "worker-subscriber")
),
"retries" => 3,
"retries_delay" => 300,
"error_queue" => "push-errors-go-here"
)
);
$ironmq->createQueue($queue_name, $params);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment