How to add one or more fields to a particular document on broker

Hi folks,

  I need help on this regard, can we add one or more fields to a particular document on a broker. If it is possible then explian to me how.

Thanks in advance,

Regards
Rajesh

Rajesh,
You can always add the fields to a publishable document in developer and push the document to the broker. Lock the document in edit mode in developer, add the fields, save the doc and push the same to broker.

Cheers,

Thanks gazi00us,

             I know how to do it from developer, r u sure that it is not possible to add one more fields to a publishable document on broker.Please confirm it again cause somebody asked this question in interview that is why i am asking.

Regards
Rajesh

Rajesh,

I am pretty sure, we can not add fields to a publishable docuemnt on a broker. Mark may be able to confirm it, if he see this post.

KK

Yes, that’s the ticket. Once a document is created on the broker it is engraved by a laser onto the silicon of the CPU and can never be changed or deleted. Broker is really just a giant ROM chip, not something that could be changed.

Hi Mark,

If I am not mistaken, broker document can be deleted from broker if we remove the trigger, canPublish and canSubcribe clients …

Correct me I miss something here.

Regards,
Sumit

Hi,

Broker document can be deleted, but if there is a publishable document existing on IS you cannot do it.
But here the ituation is to add one more field in the broker document type, without modifying the publishable document type on IS. I belive that is not possible

Rgds,
Pradeep

Hi Pradeep,

You are correct, if we have to add field it is not possible to directly add, we have add using developer and sync the doc.

However regarding deletion, it is possible to delete document from broker even if publishable document is present, i.e. we have to delete canSub, canPub and other client from broker and then delete documentType.

Actually we have multiple IS in our env, and sometimes same doc takes different broker doc names and we delete the doc and sync the docs using deployer.

ex : document name sampleDoc takes names as sampleDoc_1, sampleDoc_2 in broker and we remove those docs from broker and sync again so that we have only one instance name “sampleDoc” in broker.

Regards,
Sumit

Hi Sumit,

Yeah you are correct. i have done the deltion partit many times myself :). What i meant was with a publishable document in place on IS, there will be a document type corresponding to it on the broker, you cannot delete that one…i.e. you cannot have a publishable document on the IS with no corresponding broker document

Also how does that sampleDoc_1 and sampleDoc_2 get created at all?
There can be problems with this scenario when you have two IS connecting to the same broker and having a publisher on one IS and subscriber on another. Suppose that the same document types are defined separately on both IS, then you will surely end up creating two different documents on your broker namely _1,_2 and your pub-sub solution does not work. I have faced this problem once and solved it by installing the document type instead of creating a spearate document type on another.

Rgds,
Pradeep

Hi Pradeep,

Ya I also did the same thing and pub-sub model was not working.Hence instead of creating seperate doc type, I used deployer to sync the document in another IS :slight_smile:
When we use deployer _1, _2 scenario does not come.

Regards,
Sumit

Only if you use an industrial laser to change the ROM chip.

Hey Mark,

This entirely went off my head. I didnt understand. Can you be a bit detail

Rgds,
Pradeep