You can send a message in json encoded string with unique identifier, access list of unprocessed queue data trough RabbitMQ api, decode the message and do your magic things, such as counting particular task position.
Following is example retrieving queue list using PHP curl
// create php curl
$ch = curl_init();
$queue_titile = "hallo";
$url = "http://localhost::15672/#/api/queues/%2F/$queue_titile/get";
// define post data
$post_data = '{"vhost":"/","name":"'.$queue_titile.'","truncate":"'.$limit.'","requeue":"true","encoding":"auto","count":"'.$limit.'"}';
// set curl configuration
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, 'guest:guest');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
// send curl request
$response = curl_exec($ch);
// close curl connection
curl_close($ch);
// decode json response
$response = json_decode($response);