I am not certain but I think it is part of a mine boom designed to catch any mines floated down the river.
I once read a book about German frogmen who attempted to attach mines to the pontoon bridges across the Rhine. They failed partly due to the really strong current and partly due to guards catching them when they tried to get around the mine booms. None of the attacks were successful.
Catching mines seems like a very good plan.