{"action":"created","issue":{"url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/228","labels_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/228/comments","events_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/228/events","html_url":"https://github.com/videlalvaro/php-amqplib/issues/228","id":51583208,"number":228,"title":"Transactions howto","user":{"login":"gjuric","id":223015,"avatar_url":"https://avatars.githubusercontent.com/u/223015?v=3","gravatar_id":"","url":"https://api.github.com/users/gjuric","html_url":"https://github.com/gjuric","followers_url":"https://api.github.com/users/gjuric/followers","following_url":"https://api.github.com/users/gjuric/following{/other_user}","gists_url":"https://api.github.com/users/gjuric/gists{/gist_id}","starred_url":"https://api.github.com/users/gjuric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjuric/subscriptions","organizations_url":"https://api.github.com/users/gjuric/orgs","repos_url":"https://api.github.com/users/gjuric/repos","events_url":"https://api.github.com/users/gjuric/events{/privacy}","received_events_url":"https://api.github.com/users/gjuric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-10T17:02:02Z","updated_at":"2015-01-06T18:43:29Z","closed_at":null,"body":"It would be really helpful if someone could provide a code sample on how to use transactions.\r\n\r\nI was using it like this, but I am not sure if this is the correct way:\r\n\r\n```php\r\n    // ... connect to AMQP broker and setup exchange, queue and bindings\r\n\r\n    $channel->tx_select();\r\n\r\n    $msg = new AMQPMessage(\"test message\", array(\r\n        'content_type' => 'text/plain',\r\n        'delivery_mode' => 2)\r\n    );\r\n\r\n    $channel->basic_publish($msg, $exchange, $routingKey);\r\n    $channel->tx_commit();\r\n```"},"comment":{"url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/comments/68911175","html_url":"https://github.com/videlalvaro/php-amqplib/issues/228#issuecomment-68911175","issue_url":"https://api.github.com/repos/videlalvaro/php-amqplib/issues/228","id":68911175,"user":{"login":"videlalvaro","id":30834,"avatar_url":"https://avatars.githubusercontent.com/u/30834?v=3","gravatar_id":"","url":"https://api.github.com/users/videlalvaro","html_url":"https://github.com/videlalvaro","followers_url":"https://api.github.com/users/videlalvaro/followers","following_url":"https://api.github.com/users/videlalvaro/following{/other_user}","gists_url":"https://api.github.com/users/videlalvaro/gists{/gist_id}","starred_url":"https://api.github.com/users/videlalvaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videlalvaro/subscriptions","organizations_url":"https://api.github.com/users/videlalvaro/orgs","repos_url":"https://api.github.com/users/videlalvaro/repos","events_url":"https://api.github.com/users/videlalvaro/events{/privacy}","received_events_url":"https://api.github.com/users/videlalvaro/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T18:43:29Z","updated_at":"2015-01-06T18:43:29Z","body":"@michaelklishin do you know of any library or test suite where we us transactions?"}}