I have a pendant light, it has a cord but no threaded shaft/nipple on it so it can be attached to a bracket on in a ceiling junction box.
I can feed the cord nicely through the shaft but how do I secure the shaft to the cord?
Is there a special piece of hardware I need?
I purchased a threaded shaft like this:
And my light fixture looks like this
Update: Here is the junction box where it will be hanging (I know I need a hickey for this style junction box which will allow me to connect the shaft).
Best Answer
Here is a different answer, having now seen the ceiling box. (Thanks to @threephaseEel for requesting that)
You have a shallow box with a chandelier hub in it that will obstruct a typical crossbar and nipple. You also have knob and tube wiring so I'm hesitant to suggest changing or modifying the box at all.
To work with this box you need to buy an appropriate canopy kit. The best one I think for this box and this lamp looks like this:
It includes an offset cross bar that will avoid touching the chandelier hub, and although you COULD mount a nipple on this cross bar, this canopy does not require one. It includes a compression bushing that is the answer to your original question and just mounts to the canopy itself, you don't need the threaded nipple. It also looks appropriate for your lamp and it's cheap (about $10 US).
I know some people here frown on shopping advice so I won't be too specific but try searching for a "modern white shallow canopy kit".