Is there a way to have a mesh extrude or retract itself during an animation while rigging with bones?
Add a stretch to constraint to the bone that deforms the connecting rod. In the constraint settings you will also want to set volume variation to 0.0 so that the connector doesn't shrink as it gets stretched.