In the system I am currently building we have implemented a feature in pubsub 
that could be useable by others.

With publisher supplied item ids there is always a possibility for id clashes 
and currently it is defined that an id clash results in overwrite, this might 
not always be the best solution, indeed in our system it is not accetable to 
have clashing ids.

My proposal is to introduce config option pubsub#item_id_conflict_resolution as 
an optional part of item-ids feature with this form element
<field var='pubsub#item_id_conflict_resolution' type='list-single' label='How 
to handle publisher given item id conflicts'>
  <option><value>overwrite</value></option>
  <option><value>error</value></option>
  <option><value>create_new</value></option>
  <value>overwrite</value>
</field>

The default value of "overwrite" works as the current default so nothing 
breaks. The value "error" disallows publishes with same ids and returns a 
<conflict/> error on publish. The value "create_new" will ignore the 
conflicting id and create a new one, same as if no id have been supplied.

-- Mads Randstoft

Reply via email to