I'd use an insert nut and a hanger bolt. Almost any solution is going to require you to be able to drill two clean center holes.
Above are two examples of insert nuts, you drill a hole larger than your bolt and insert this specialty nut to give you machine threads. (Similar to a tee nuts found in the bottom of chairs, couches, tables, etc except this can provide a flush (or past flush) mount and better for pull forces). The other side will have a hanger bolt, it has wood threads on one side and machine threads on the other. Just make sure to get matching/same sizes of insert nut and hanger bolt.
The insert nut should have a description of what drill to use, if it doesn't you should be able to Google it easily. Drill one piece's end to that size (pilot hole up to you), depth should be the greater of the two (insert nut or machine end of hanger bolt). Install insert nut with appropriate tools (Allen key, screw driver, etc)
Drill the other piece to fit the wood threads, most likely will have to gauge by hand holding the drill bit in front on the wood threads use the largest drill that hides 90-100% of the center without hiding any (or extremely little) of the threads. Again depth should be appropiate, the length of the wood thread side. Now the only really part tricky, inserting the hanger bolt. I'd recommend buying two nuts the same as the machine thread. Screw them both on the end then tighten them against each other. Use the far/top one to drive it in, then release the two nuts from each other and remove nuts. Slightly more difficulty, you can install the hanger bolt by inserting the machine thread into the finished piece and just rotate the other one on.
Put two pieces together if you haven't done so already.
This solution will allow you to make sure the connected rod is tight together as well as allow you to disconnect the two in case you ever want to.