How to prevent adding of duplicate item to Drupal Queue? I am using Drupal Queue (Class DrupalQueue) to store items (a simple objects). 

How can I check if there is already the same object in the queue before adding a new one ?
You cannot find the previously entered values in the queue, since the DrupalQueueInterface interface doesn't expose a method to retrieve a previously added value. You cannot even rely on the fact the value is added in a database table, since that is an implementation detail that can change with the class actually implementing the queue, which can be easily changed from a module.

That is the reason why modules like the Aggregator module take their data from their own database table, where they record the last time they added those values in the queue. (See the comment that says Add timestamp to avoid queueing item more than once.)

  $result = db_query('SELECT * FROM {aggregator_feed} WHERE queued = 0 AND checked + refresh &lt; :time AND refresh &lt;&gt; :never', array(
    ':time' =&gt; REQUEST_TIME,
    ':never' =&gt; AGGREGATOR_CLEAR_NEVER
  ));
  $queue = DrupalQueue::get('aggregator_feeds');
  foreach ($result as $feed) {
    if ($queue-&gt;createItem($feed)) {
      // Add timestamp to avoid queueing item more than once.
      db_update('aggregator_feed')
        -&gt;fields(array('queued' =&gt; REQUEST_TIME))
        -&gt;condition('fid', $feed-&gt;fid)
        -&gt;execute();
    }
  }

  // Remove queued timestamp after 6 hours assuming the update has failed.
  db_update('aggregator_feed')
    -&gt;fields(array('queued' =&gt; 0))
    -&gt;condition('queued', REQUEST_TIME - (3600 * 6), '&lt;')
    -&gt;execute();


You could implement a queue class that checks the value has been already inserted, and use that as default queue class, but a module cannot rely on such implementation details.